close

HOWTO: Fix Apple's WebKit and JavaScriptCore Framework Error

The error message:

1
2
3
Symbol not found: __ZN3KJS11Interpreter4markEv
Referenced from: /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore
Expected in: /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore

The probable cause:
All fingers seems to point to the Safari and Security update. This happens mostly on Tiger system, but it happens on a brand new Macbook on the way being updated to the latest version after opening the box.

Resolution:
This error is solved by replacing the Webkit.framework and JavaScriptCore.framework; however there are not that many walkthrough on how to replace the frameworks. Here's a guide on how to replace the framework:

  1. Download Pacifist
  2. Download Leopard 10.5.4 Combo Update or Tiger 10.4.11 (Intel) Combo Update or Tiger 10.4.11 (PPC) Combo Update
    NOTE: This method has only been tested and confirmed on the Leopard version. The tiger version is only an educated guess
  3. Open pacifist (trial version is okay) and use it to open the package (the .pkg file that is available after mounting the 10.5.4 combo update)
  4. Navigate to find the System/Library/Framework both in the Pacifist and Finder
  5. Drag and drop the Webkit.framework and JavaScriptCore.framework from the Pacifist to the Finder (admin password will be asked, confirm file replacement as needed)
  6. Restart your computer
  7. Note : For Tiger 10.4.11 (PPC) Maybe crash for anything !!! All applications (include Firefox, X11, terminal, text editor, Acrobat Reader cannot work anymore.)


How to fix broken WebKit Framework after Safari 3.1 upgrade

After my girlfriend upgraded to Safari 3.1 via Apple's Software Update utility, none of the apps which use the WebKit Framework worked and kept crashing (Safari, iChat, Skype, etc.).
The really bad thing was that also the Software Update and the Application Installer itself didn't start up after the update. So no chance to reinstall the update with a GUI.

For the case you ran into the same troubles, here is how we fixed it:

  • Download the Safari update from http://apple.com/safari (hopefully you have a non Webkit Browser installed like Camino or Firefox, or get the update somehow else)
  • Open the downloaded .dmg file
  • Put the .pkg-file which is contained in the .dmg-file somewhere where you can find it later (e.g your home directory)
  • Start up the Terminal application
  • Enter this command sudo installer -pkg <path-to-pkg-file> -target LocalSystem (replace <path-to-pkg-file> with the actual path to .pkg-file)
  • It will ask for your password. Type it in and press enter
  • Restart your computer when asked to do so


written March 25 2008 by
Kommen
tagged with
Macosx, Safari, Webkit
5 Comments so far. Go, post one!
Previous From Wellington to Queenstown
Instapaper: Convenient… Next
Related Articles
Leopard: QuickLook Not For Our Applications
MobileMe Only Partially Compatible with IE7
WebKit's CSS Animations
I have to say I done exactly the same, I downloaded the Safari beta as soon as is became available. Unfortunately I have encountered a serious problem…..Once the dmg file had downloaded I double clicked the icon to install and nothing happened, so being impatient I tried again to no avail. Since doing this my entire system has started to crash with app's refusing to open and the dashboard failing on me…..it might not be the new browser but cannot think of another reason for this happening. I am currently running an iMac G5 PPC with isight with 1GB of ram. The exact error message when trying to open dashboard is:
Library not loaded: /System/Library/Frameworks/
WebKit.framework/
Versions/A/WebKit
Referenced from: /System/Library/CoreServices/
Dock.app/Contents/
Resources/DashboardClient.app/
Contents/MacOS/DashboardClient
Reason: image not found
So if anyone can help me repair this problem without a full system reboot please please reply to this thread as at least 70% of my programs are coming up with the same error in console! Please don't let this put you off downlooading the new beta as it may be something else entirely that has caused this problem…


Follow these steps:
1. Open your Safari 3 DMG.
2. Right-click on Safari3Beta.pkg and left-click "Show Package Contents"
3. Open the Contents folder and copy Archive.pax.gz to your desktop
4. Double-click Archive.pax.gz from your desktop — an Archive.pax and an Archive folder will appear on Desktop.
5. Open the Archive folder, and then the System, Library and Frameworks folders. Drag the two .framework folders to your desktop
6. Now open your hard drive, open the System, Library and Frameworks folders.
7. Drag the two folders from the Desktop to your Finder window. (You'll probably have to click Authenticate and type in your username and password).
8. If you get any errors saying it can't overwrite them, it's because they already exist, so try them one at a time instead.
9. Go to your Archive folder on your desktop again and open the System, Library and now PrivateFrameworks folders. Drag the two folders to your desktop.
10. Open your hard drive and go to your System, Library, PrivateFrameworks folders. Drag the JavaScriptGlue.framework and WebKitDashboard.framework folders from your Desktop to your Finder window.
11. Repeat step 8.
12. If Safari.app is missing from your Applications folder, then drag it from your Archive/Applications folder to your Applications folder on your hard drive.


Safari 2, Safari 3, Adium & forcing WebKit Frameworks

After installing Safari 3 you won't be able to run Safari 2 to test websites or whatever anymore.

Here's the trick to make it work

  1. Install Safari 3 Beta
    1. Yes, you have to reboot. Lame :(
    2. Rename /Applications/Safari.app to /Applications/Safari3.app
  2. Install WebKit Nightly as Safari2
    1. Rename /Applications/WebKit.app to /Applications/Safari2.app
  3. Unarchive the backed up Safari
    1. Open /Library/Application Support/Apple/.SafariBetaArchive.tar.gz
  4. Copy the old Safari from /Library/Application Support/Apple/.SafariBetaArchive/Applications/Safari.app to /Applications/Safari.app
  5. Copy all the frameworks into Safari2
    1. Copy /Library/Application Support/Apple/.SafariBetaArchive/System/Library/Frameworks/WebKit.framework
      /Library/Application Support/Apple/.SafariBetaArchive/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/JavaScriptCore.framework
      /Library/Application Support/Apple/.SafariBetaArchive/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework
      /Library/Application Support/Apple/.SafariBetaArchive/System/Library/PrivateFrameworks/JavaScriptGlue.framework
      to /Applications/Safari2.app/Contents/Resources
  6. Open Safari2

Shell script

Alternatively, you can use this shell script to make it all work without having to do it all manually…

  1. Install Safari 3 Beta
  2. Install WebKit Nightly
  3. Unarchive the backed up Safari
    1. Run this from the terminal:
open "/Library/Application Support/Apple/.SafariBetaArchive.tar.gz" 

4. Then run this script to do the rest…

mv /Applications/Safari.app /Applications/Safari3.app &&
mv /Applications/WebKit.app /Applications/Safari2.app &&
ditto "/Library/Application Support/Apple/.
SafariBetaArchive/Applications/Safari.app" /Applications/Safari.app &&

rm -Rf \
/Applications/Safari2.app/
Contents/Resources/JavaScriptCore.framework/ \
/Applications/Safari2.app/
Contents/Resources/JavaScriptGlue.framework/ \
/Applications/Safari2.app/
Contents/Resources/WebCore.framework/ \

/Applications/Safari2.app/
Contents/Resources/WebKit.framework/ &&
cp -Rf \
"/Library/Application Support/Apple/.
SafariBetaArchive/System/Library/Frameworks/WebKit.framework" \
"/Library/Application Support/Apple/.
SafariBetaArchive/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/JavaScriptCore.framework" \

"/Library/Application Support/Apple/.
SafariBetaArchive/System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework" \
"/Library/Application Support/Apple/.
SafariBetaArchive/System/Library/PrivateFrameworks/JavaScriptGlue.framework" \

/Applications/Safari2.app/
Contents/Resources/
UPDATED Date: 2007-06-13 18:15:32

How to force another app to open with the old WebKit

You can force anything to run with the old WebKit if it's having problems working with the new beta.

env DYLD_FRAMEWORK_PATH="/Applications/Safari2.app/Contents/Resources" WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES "PATH_TO_THE_BIN_IN_YOUR_APP" &

Just replace PATH_TO_THE_BIN_IN_YOUR_APP with the path to the binary in the app you want to force to use the old WebKit frameworks.

How to make Adium work after installing Safari 3

For Adium you'd use:

env DYLD_FRAMEWORK_PATH="/Applications/Safari2.app/Contents/Resources" WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES "/Applications/Adium.app/Contents/MacOS/Adium" &


Safari, Adium, Skype, Updater, iTunes, Mail: Wont work after latests OS X update

Today the OS X updater asked me if i want to install the latest updates for OS X. Of course i want to. It is important to stay up to date. On the edge. Latest stuff. Now i know better:
After the update tons of applications failed to start!
I can live without iTunes for a day or two… but Skype, Safari, Adium, Mail: i need those. Please give them back to me!
In the log files i found this message "Symbol not found: __ZN3KJS11Interpreter4markEv" (and similar). To my suprise Firefox still worked and i found out that the problem was caused by udates installed in wrong order (first Security Update and then Safari). So the solution was:

  • Download Safari Update (Safari31UpdLeo.dmg)
  • Extract the dmg file (i did this in finder)
  • Install the pkg file

Installation of the package file did not work in finder. So i had to do following in a console

sudo -s
installer -pkg /User/foo/Safari31UpdLeo.pkg -target "/Volumes/Macontosh HD"
shutdown -h now

And my OS X is back. I have to say that this is the first time in years that an OS X update caused troubles for me… but still: i don't see how an average computer user could solve this problem!


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Bluelove1968 的頭像
    Bluelove1968

    藍色情懷

    Bluelove1968 發表在 痞客邦 留言(0) 人氣()