Bug 208386 - run-safari --ios-simulator fails with `Can't locate object method "dictionaryWithContentsOfFile_"`
Summary: run-safari --ios-simulator fails with `Can't locate object method "dictionary...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-28 11:49 PST by James Darpinian
Modified: 2020-04-27 09:11 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Darpinian 2020-02-28 11:49:09 PST
When I run Tools/Scripts/run-safari --ios-simulator --debug, I get an error message:

Can't locate object method "dictionaryWithContentsOfFile_" via package "NSDictionary" (perhaps you forgot to load "NSDictionary"?) at /Users/jdarpinian/src/WebKit2/Tools/Scripts/webkitdirs.pm line 1527.

When I run Tools/Scripts/run-minibrowser --ios-simulator --debug, I don't get an error message, but it doesn't work either. The script runs for about 3 seconds and then exits without printing anything, and the iOS simulator does not start.
Comment 1 Alexey Proskuryakov 2020-02-29 13:16:38 PST
I'm guessing that you have a custom Perl installed via some package manager. What does "which perl" say in Terminal?

Does this work when just run with perl in command line?

sub f
{
    eval "require Foundation";
    print Foundation::perlRefFromObjectRef(NSDictionary->dictionaryWithContentsOfFile_("/Applications/Safari.app/Contents/Info.plist"));
}

f()
Comment 2 Alexey Proskuryakov 2020-04-27 09:11:43 PDT
This code was removed in bug 211008, so this particular problem can't happen any more. Still, scripts are not guaranteed to work if you have a custom version of Perl or Python installed.