Showing posts with label Safari. Show all posts
Showing posts with label Safari. Show all posts

Downgrading Safari for Mac OS X

Today I ran into an issue running my GWT application. The problem came from updating to Safari 4.0.4 (to read on this issue click here).

The obvious solution was to downgrade back to Safari 4.0.3. I have needed to do this before and it was not an easy task (I'm running Mac OS X 10.5.8) Finally, I found an easy way to accomplish this task.

First, you need to download an application called Pacifist. Then you need to find the dmg image for the version of Safari you want to downgrade to. In my case, 4.0.3 can be found here. Once you have the package downloaded, you will need to open it in Pacifist. Select the pkg and hit "Install". Once it starts the install process, it will tell you that the file(s) already exist. For all files / applications, tell it to "Replace" the existing file.


As an Amazon Associate I earn from qualifying purchases.

Downgrading Safari for Mac OS X

Today I ran into an issue running my GWT application. The problem came from updating to Safari 4.0.4 (to read on this issue click here).

The obvious solution was to downgrade back to Safari 4.0.3. I have needed to do this before and it was not an easy task (I'm running Mac OS X 10.5.8) Finally, I found an easy way to accomplish this task.

First, you need to download an application called Pacifist. Then you need to find the dmg image for the version of Safari you want to downgrade to. In my case, 4.0.3 can be found here. Once you have the package downloaded, you will need to open it in Pacifist. Select the pkg and hit "Install". Once it starts the install process, it will tell you that the file(s) already exist. For all files / applications, tell it to "Replace" the existing file.


As an Amazon Associate I earn from qualifying purchases.

GWT Safari 4 problem on Twitter



As an Amazon Associate I earn from qualifying purchases.

Workaround for Safari 4 and GWT Issue

Here is a temporary workaround for this issue with opening GWT projects in Safari 4:

1. Compile the project in PRETTY mode (see previous post).
2. Find the files used by Safari. To do this, run this script in the compiled directory(~/Documents/workspace/MyProjectName/www/com.MyProjectName):
grep 'safari' *.nocache.js

This will find one or more files. The only difference between the files (as far as I can tell) is language settings.

3. Copy the 'default' file to another location. This will be used later.
4. Recompile in OBFUSCATED mode instead of PRETTY (see previous post) and deploy to the server.
5. Open the project in Safari 4.
6. Open the Error Console in Safari 4 (Develop --> Show Error Console)
7. You will see an error saying "SyntaxError: Expression too deep". Parallel to that, there will be a file name. Rename the file that you saved earlier to this file name.
8. Take this renamed file and replace the existing file on the server.
9. Restart the server.


There is also another workaround I have found and tested:

1. Compile and deploy in OBFUSCATED mode.
2. Open the application in Safari 4.
3. Open the Error Console in Safari 4 (Develop --> Show Error Console)
4. Find the offending file that is creating the error and open it in an editor (*Note: do to the large size of these files, some editors will not be able to open it. I use BBEdit (for Mac).)
5. Once the file is open, you will see a very long line of variables (ie: var ..., ..., ...). This is the offensive line. Insert new line characters every several hundred characters. (I believe the computable threshold is a thousand characters, but I have not run appropriate test to find the limit.)
6. Save the file and restart the server.


As an Amazon Associate I earn from qualifying purchases.

Workaround for Safari 4 and GWT Issue

Here is a temporary workaround for this issue with opening GWT projects in Safari 4:

1. Compile the project in PRETTY mode (see previous post).
2. Find the files used by Safari. To do this, run this script in the compiled directory(~/Documents/workspace/MyProjectName/www/com.MyProjectName):
grep 'safari' *.nocache.js

This will find one or more files. The only difference between the files (as far as I can tell) is language settings.

3. Copy the 'default' file to another location. This will be used later.
4. Recompile in OBFUSCATED mode instead of PRETTY (see previous post) and deploy to the server.
5. Open the project in Safari 4.
6. Open the Error Console in Safari 4 (Develop --> Show Error Console)
7. You will see an error saying "SyntaxError: Expression too deep". Parallel to that, there will be a file name. Rename the file that you saved earlier to this file name.
8. Take this renamed file and replace the existing file on the server.
9. Restart the server.


There is also another workaround I have found and tested:

1. Compile and deploy in OBFUSCATED mode.
2. Open the application in Safari 4.
3. Open the Error Console in Safari 4 (Develop --> Show Error Console)
4. Find the offending file that is creating the error and open it in an editor (*Note: do to the large size of these files, some editors will not be able to open it. I use BBEdit (for Mac).)
5. Once the file is open, you will see a very long line of variables (ie: var ..., ..., ...). This is the offensive line. Insert new line characters every several hundred characters. (I believe the computable threshold is a thousand characters, but I have not run appropriate test to find the limit.)
6. Save the file and restart the server.


As an Amazon Associate I earn from qualifying purchases.

GWT and Safari 4 Public Release

There have been some issues pertaining to the new public release of Safari 4 and the way it is handling GWT. It seems the problem is due to the version of WebKit used in this new version of Safari (this is speculation because GWT worked properly with the Safari 4 beta). The issue has already been raised with Google:


As of today (6/10/2009), the status of the issue has been set to FixedNotReleased, but there has not been a release date set.

The only possible work-around available at this point is to compile our project is what is known as "PRETTY" mode. The problem with this is that the initial download size of our site will then be at least three times larger, causing everyone to experience an extreme slowdown.

People have experienced this issue with both GWT 1.5.3 and 1.6.4, so, unfortunately, switching versions will not fix this issue.


Issue Update (6/23/2009):
I'm just updating on the current status of this issue. Apparently, there are quite a few people who are having this problem and have said so to the GWT team. As of today, there is a fix for this issue in SVN, but they have yet to release it as either a new version or a patch.

Here is a link to a post I wrote with a workaround (for the time being):
http://ukitech.blogspot.com/2009/06/workaround-for-safari-4-and-gwt-issue.html


As an Amazon Associate I earn from qualifying purchases.

GWT and Safari 4 Public Release

There have been some issues pertaining to the new public release of Safari 4 and the way it is handling GWT. It seems the problem is due to the version of WebKit used in this new version of Safari (this is speculation because GWT worked properly with the Safari 4 beta). The issue has already been raised with Google:


As of today (6/10/2009), the status of the issue has been set to FixedNotReleased, but there has not been a release date set.

The only possible work-around available at this point is to compile our project is what is known as "PRETTY" mode. The problem with this is that the initial download size of our site will then be at least three times larger, causing everyone to experience an extreme slowdown.

People have experienced this issue with both GWT 1.5.3 and 1.6.4, so, unfortunately, switching versions will not fix this issue.


Issue Update (6/23/2009):
I'm just updating on the current status of this issue. Apparently, there are quite a few people who are having this problem and have said so to the GWT team. As of today, there is a fix for this issue in SVN, but they have yet to release it as either a new version or a patch.

Here is a link to a post I wrote with a workaround (for the time being):
http://ukitech.blogspot.com/2009/06/workaround-for-safari-4-and-gwt-issue.html


As an Amazon Associate I earn from qualifying purchases.

Safari - empty cache

It is essential that you empty the cache after the deployment of the
new version of application. Otherwise the old files may be breaking
the application.


As an Amazon Associate I earn from qualifying purchases.

Safari - empty cache

It is essential that you empty the cache after the deployment of the
new version of application. Otherwise the old files may be breaking
the application.


As an Amazon Associate I earn from qualifying purchases.

apt quotation..