I'm developing an application with react native and I recently published it on the test flight for my beta testers to use the application, but now I need to continue developing but when I run
react-native run-ios
the application is installed on the emulator but the error appears:
Could not connect to development server.
Ensure the following:
Node server is running and available on the same network - run 'npm start' from react-native root
Node server URL is correctly set in AppDelegate
WiFi is enabled and connected to the same network as the Node Server
URL: http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=br.com.W2App
RCT Fatal
__28-[RCTCxxBridge handleError:]_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_drain
_dispatch_main_queue_callback_4CF
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
-[UIApplication _run]
UIApplicationMain
main
start_yes
0x0
0x0
In the output log in the terminal appears:
2022-12-23 16:16:32.957 xcodebuild[44831:5288964] [MT] IDEFileReferenceDebug: [Load] <IDESwiftPackageCore.IDESwiftPackageSpecialFolderFileReference, 0x13bb0fc60: name:Docs.docc path:group:Docs.docc> Failed to load container at path : /Users/goattech/Library/Developer/Xcode/DerivedData/W2App-bcybuxjmeijubwcppznzxbonxojg/SourcePackages/checkouts/swift-protobuf/Sources/protoc-gen-swift/Docs.docc, Error: Error Domain=com.apple.dt.IDEContainerErrorDomain Code=6 "Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder"." UserInfo={NSLocalizedDescription=Cannot open "Docs.docc" as a "Swift Package Folder" because it is already open as a "Folder".}
2022-12-23 16:16:38.199 xcodebuild[44831:5290006] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition
info Installing "/Users/goattech/Library/Developer/Xcode/DerivedData/W2App-bcybuxjmeijubwcppznzxbonxojg/Build/Products/Debug-iphonesimulator/W2App.app"
info Launching "br.com.W2App"
success Successfully launched the app on the simulator
✨ Done in 111.36s.
I already changed the ios scheme from release to debug back but that didn't help, I need to run the app in development mode inside the IOS emulator
Related
Today, I've updated my iMac to macOS Mojave from macOS High Sierra. Since then I'm not able to open simulator. Every time I tried to open the simulator that crashes immediately. Whenever I tried to run the simulator via Xcode then Xcode shows this error
Timed out waiting for the simulator application for iphonesimulator to become ready
Also, I tried to open the simulator directly and it's crash immediately. Here the gif (gif is a little bit slow) -
System CPU & Memory Status -
Here some solution that I've tried but no luck -
Clear iPhone Simulator Cache
xcrun simctl erase all
Clear DerivedData
~/Library/Developer/Xcode/DerivedData/
Clear iOS DeviceSupport
~/Library/Developer/Xcode/iOS DeviceSupport/
Delete Xcode Preferences
defaults delete com.apple.dt.Xcode
Restart Xcode & System
Update 1
macOS Logs -
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Device iPhone XS (978302BA-5255-44CB-A77C-188071B99A7C, iOS 12.0, Booted) is available but has no defaultDisplay'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff33a9543d __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff5f9a6720 objc_exception_throw + 48
2 CoreFoundation 0x00007fff33ab008e +[NSException raise:format:arguments:] + 98
3 Foundation 0x00007fff35e4c55d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
4 Simulator 0x000000010e7510da Simulator + 106714
5 libdispatch.dylib 0x00007fff60a24d4f _dispatch_call_block_and_release + 12
6 libdispatch.dylib 0x00007fff60a25dcb _dispatch_client_callout + 8
7 libdispatch.dylib 0x00007fff60a2c120 _dispatch_lane_serial_drain + <…>
)
This command should fix your issue (close sim before and open after):
sudo killall -10 com.apple.CoreSimulator.CoreSimulatorService
After this, restart Xcode and if simulator not available then we need to add them manually from Windows > Device and Simulators
This resolved my issue
Force quit simulator by:- option + command + esc choose simulator and quit.
Quit Xcode and restart then it worked!
I'm trying to upload my app that uses ARKit (Unity build) to iTunes Connect for TestFlight distribution. While both exporting and uploading to app store processes from Xcode -> Organizer I see crash on "Stripping extended attributes for APPNAME.app".
I checked all configuration of bitcode and symbols on/off, signing automatically, manually. Deployment target of my project is iOS 10, as 11 cannot be set.
I also tried following steps from simillar thread (https://forums.developer.apple.com/thread/83219) and added App Store 1024 icon to Images.xcassets.
Any ideas why Xcode is crashing?
Screenshot from just before the crash:
Crash report:
Process: Xcode [10862]
Path: /Applications/Xcode-9b6.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 9.0 (13238.4)
Build Info: IDEFrameworks-13238004000000000~11
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [10862]
User ID: 501
Date/Time: 2017-09-10 14:56:10.196 +0100
OS Version: Mac OS X 10.12.6 (16G29)
Report Version: 12
Anonymous UUID: FD8390BC-9E7B-969D-15A2-22A8DBBD050D
Time Awake Since Boot: 16000 seconds
System Integrity Protection: enabled
Crashed Thread: 17 Dispatch queue: ConcurrentQueue: -[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
VM Regions Near 0x20:
-->
__TEXT 0000000103625000-0000000103627000 [ 8K] r-x/rwx SM=COW /Applications/Xcode-9b6.app/Contents/MacOS/Xcode
Application Specific Information:
ProductBuildVersion: 9M214v
Thread 0:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fffbb90634a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fffbb905797 mach_msg + 55
2 com.apple.CoreFoundation 0x00007fffa6037434 __CFRunLoopServiceMachPort + 212
3 com.apple.CoreFoundation 0x00007fffa60368c1 __CFRunLoopRun + 1361
4 com.apple.CoreFoundation 0x00007fffa6036114 CFRunLoopRunSpecific + 420
5 com.apple.HIToolbox 0x00007fffa5596ebc RunCurrentEventLoopInMode + 240
6 com.apple.HIToolbox 0x00007fffa5596cf1 ReceiveNextEventCommon + 432
7 com.apple.HIToolbox 0x00007fffa5596b26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
8 com.apple.AppKit 0x00007fffa3b2fa54 _DPSNextEvent + 1120
9 com.apple.AppKit 0x00007fffa42ab7ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
10 com.apple.dt.DVTKit 0x0000000103eb58be -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 390
11 com.apple.AppKit 0x00007fffa3b243db -[NSApplication run] + 926
12 com.apple.AppKit 0x00007fffa3aeee0e NSApplicationMain + 1237
13 libdyld.dylib 0x00007fffbb7df235 start + 1
Edit
Running xcodebuild (through fastlane gym) produces the following:
+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/gym_config20170912-61009-190kutb.plist -archivePath '/Users/wert/Library/Developer/Xcode/Archives/2017-09-12/towerar 2017-09-12 22.06.54.xcarchive' -exportPath /var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/gym_output20170912-61009-42bo6w
2017-09-12 22:09:04.966 xcodebuild[62085:5372649] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/z1/m155xvnn42s7xl7hfw3_8w5w0000gn/T/Unity-iPhone_2017-09-12_22-09-04.966.xcdistributionlogs'.
2017-09-12 22:09:21.584 xcodebuild[62085:5372649] [MT] IDEDistribution: Step failed: <IDEDistributionPackagingStep: 0x7fc3c75f18b0>: <IDEDistributionPackagingStep: 0x7fc3c75f18b0>
2017-09-12 22:09:21.584 xcodebuild[62085:5372649] -[__NSCFString userInfo]: unrecognized selector sent to instance 0x7fc3c74d72f0
** INTERNAL ERROR: Uncaught exception **
Uncaught Exception: -[__NSCFString userInfo]: unrecognized selector sent to instance 0x7fc3c74d72f0
Stack:
0 __exceptionPreprocess (in CoreFoundation)
1 objc_exception_throw (in libobjc.A.dylib)
2 -[NSObject(NSObject) doesNotRecognizeSelector:] (in CoreFoundation)
3 ___forwarding___ (in CoreFoundation)
4 _CF_forwarding_prep_0 (in CoreFoundation)
5 __55-[Xcode3CommandLineBuildTool _distributeArchiveAndExit]_block_invoke (in Xcode3Core)
6 -[Xcode3CommandLineBuildTool _distributeArchiveAndExit] (in Xcode3Core)
7 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
8 0x0000000104d752af (in xcodebuild)
9 start (in libdyld.dylib)
I've had to uncheck all checkboxes and use manual managing signing, then it was possible to proceed in the wizard.
Does the xattr command line tool work? It's possible your python installation is damaged, or if you've replaced the installed xattr module then you may need to reinstall the system provided one.
I had been experiencing same frustating problem and it happen almost all day , Xcode 9 suddenly crashes in the middle of the archiving process, resulting in the same error report.
#dangercheng gave me insight about archive process in xcode 9, which is, it needs the xattr command , therefore I go check xattr command in my macbook and somehow xattr doesn't work. From the verbose message, it reveals that the error is related to file permission owned by folders/files inside /Library/Python/2.7 . Somehow a user other than root has no right to write (w/ 2) on those files/folders.
From above facts I concluded that I need to change file permission in this case chmod -R 775 and apply it to all folders and its content on /Library/Python/2.7. After that my xattr is running well and my Archive process in Xcode 9 is running smoothly, experiencing no crash.
Thanks for all of you guys
In my case, it was due to permissions issues with python.
When running xattr from terminal I had the following error:
IOError: [Errno 13] Permission denied: '/Users/cb/Library/Python/2.7/lib/python/site-packages/zc.buildout-1.5.2-py2.7.egg-info/namespace_packages.txt'
Taking a look inside the /Users/cb/Library folder I found that all of the folders were owned by cb:staff (my currently logged in user and group) but the /Users/cb/Library/Python folder was owned by root:wheel
Running the following will eliminate the error:
sudo chown -R $USER:$(id -g) /Users/$USER/Library/Python
After the sudo chown you can run xattr again to verify. There should be no errors or other output from the xattr command.
Probably not your fault but do file a bug with Apple. But when the Xcode uploader fails for any reason try the good ol' Application Loader:
Xcode.app/Contents/Applications/Application Loader.app
run 'xattr' command in mac terminal,if result like bellow:
python version 2.7.10 can't run /usr/bin/xattr. Try the alternative(s):
/usr/bin/xattr-2.6 (uses python 2.6)
/usr/bin/xattr-2.7 (uses python 2.7)
Run "man python" for more information about multiple version support in
Mac OS X.
you should creat a new soft link to '/usr/bin/xattr-2.7'
run bellow commands:
cd /usr/bin
sudo rm xattr
sudo ln -s xattr-2.7 xattr
this solve my problem!
I solved my problem following #dangercheng's answer.
I upgraded my python to python 3.6 two days ago.And it seems that the xattr command was executed under python3.6 .
However, when I execute xattr in terminal.
File "/usr/bin/xattr", line 31
continue
^
TabError: inconsistent use of tabs and spaces in indentation
Something bad happened!
So I edit the source code of xattr.
for i in g:
vers = vpat.search(i)
if vers is None:
continue //add 4 space
sys.stderr.write("%s (uses python %s)\n" % (i, i[vers.start():vers.end()]))
n = 1
```
python version 3.6.3 can't run /usr/bin/xattr. Try the alternative(s):
(Error: no alternatives found)
Run "man python" for more information about multiple version support in
Mac OS X.
```
another error!
I guess the xattr command should judge the version of python and execute suitable codes and the code of python3 contains some error.
Finally I change the default version of python to python2.7 and replace softlink of xattr to xattr-2.7. It works.
Attention, when xcodebuild execute xattr command the path of python was "/usr/bin/python".
The path "/usr/bin/python" was softlink too.
So, I resolved this problem following this step.
Step1:
cd /usr/bin
Step2:
sudo rm python
sudo ln -s python2.7 python
Step3:
sudo rm xattr
sudo ln -s xattr-2.7 xattr
If you can not found python2.7 under "/usr/bin", please find another suitable python path such as "/Library/Frameworks/Python.framework/Versions/2.7" etc.
After install macOS Sierra + Xcode 8 beta
My Xcode 7.3.1 can't run iOS simulator anymore,
How can i fixed this?
here is system logs.
Jun 15 07:46:11 Siams-MacBook-Pro com.apple.xpc.launchd[1] (com.apple.CoreSimulator.CoreSimulatorService[2246]): Service exited due to signal: Killed: 9 sent by com.apple.CoreSimulator.CoreSimu[2246]
Jun 15 07:46:12 Siams-MacBook-Pro com.apple.CoreSimulator.CoreSimulatorService[2748]: com.apple.CoreSimulator.CoreSimulatorService 209.19 starting.
Jun 15 07:46:12 Siams-MacBook-Pro com.apple.CoreSimulator.CoreSimulatorService[2748]: Default device D340C405-CF9F-482C-82CE-ADE8A2399529 is no longer in the set, and an alternative could not be found. iPhone / Watch pairings may not be correct.
Jun 15 07:46:12 Siams-MacBook-Pro com.apple.CoreSimulator.CoreSimulatorService[2748]: Default device C3CBAFAD-D139-49CE-9EF1-E2437A2349A7 is no longer in the set, and an alternative could not be found. iPhone / Watch pairings may not be correct.
Jun 15 07:46:12 Siams-MacBook-Pro com.apple.CoreSimulator.CoreSimulatorService[2748]: Default device 0916CCBC-1DAA-4CA4-8DCA-FFD87C8941E0 is no longer in the set, and an alternative could not be found. iPhone / Watch pairings may not be correct.
Jun 15 07:46:12 Siams-MacBook-Pro com.apple.CoreSimulator.CoreSimulatorService[2748]: Default device 9CC780B5-3034-4083-B52F-2354FB0A8252 is no longer in the set, and an alternative could not be found. iPhone / Watch pairings may not be correct.
Another log
Jun 15 10:03:26 Siams-MacBook-Pro DTServiceHub[11482]: DTServiceHub[11482]: [error] 'mach_msg_send' failed: (ipc/send) invalid destination port (268435459)
Jun 15 10:03:36 Siams-MacBook-Pro Xcode[10188]: +[DTServiceHubClient localConnectionWithAuthorization:returningServerPid:]: failed to establish connection with DTServiceHub service '/Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Resources/DTServiceHub'
Jun 15 10:03:36 Siams-MacBook-Pro Xcode[10188]: Xcode[10188]: [error] 'mach_msg_send' failed: (ipc/send) invalid destination port (268435459)
Short term solution:
Build app
The app will still install on the simulator, even with the error
Launch the app manually on the simulator
Go to Xcode
Click Debug > Attach to Process > Your App Name
This isn't recommended since you have to do it every time you want to run your app.
Long term solution (recommended):
Reinstall Xcode from the Developer Center. Doing so will clear this error, and the app will run smoothly.
This should work.
Build app
The app will still install on the simulator, even with the error
Launch the app manually on the simulator
Go to Xcode
Click Debug > Attach to Process > Your App Name
I fixed the problem by deleting both XCode 7.3.1 and 8 Beta and reinstalling just XCode 7.3.1 from DMG.
I have final version of XCode 6 (version 6.0.1). In my project, I have problem when running it.
I got
"App installation failed - Could not inspect the application package."
If I run project again, it runs ok. Another run, problem again... etc. So every second run ends in this error, right after that application run just fine.
I have no problem in XCode 5.
If you have moved or copied a folder named resources or resource into your project, try renaming it. Then perform a clean.
I had the same issue, And was unable to install the ipa. It always ended with an error "Could not inspect the application package." and some warnings in device console
Feb 10 17:38:16 iPhone mobile_installation_proxy[356] <Warning>: LaunchServices: Please include the kCFBundleIdentifierKey in the options dictionary when installing an app.
Feb 10 17:38:16 iPhone mobile_installation_proxy[356] <Warning>: LaunchServices: installing app with unknown bundleID
.
.
Feb 10 17:38:16 iPhone installd[44] <Error>: 0x101bcc000 -[MIBundle _validateWithError:]: 28: Failed to load Info.plist from bundle at path
Feb 10 17:38:16 iPhone installd[44] <Error>: 0x101bcc000 + [MIInstallable installablesAtURL:packageFormat:userOptions:error:]: Failed to create bundle for …
After spending hours, I got it fixed by adding the "Application requires iPhone environment" in info.plist
<key>LSRequiresIPhoneOS</key>
<true/>
I've been building an iOS app on our Jenkins server with no problems until I've added the Crashlytics framework to that project.
Now it fails when running this command:
/usr/bin/codesign --force --sign 97B4681D342EA8BD5AE8D283B6A924BF6AF3CF95 --resource-rules=/Users/jenkins/dev/workspace/megared-ios/build/Megared\ Stage.app/ResourceRules.plist --entitlements /Users/jenkins/Library/Developer/Xcode/DerivedData/Megared-hitcnfjdmnrzijfoehutangiwnos/Build/Intermediates/Megared.build/Stage-iphoneos/Megared.build/Megared\ Stage.xcent /Users/jenkins/dev/workspace/megared-ios/build/Megared\ Stage.app
The error is the following:
/Users/jenkins/dev/workspace/megared-ios/build/Megared Stage.app: User interaction is not allowed.
Command /usr/bin/codesign failed with exit code 1
I have a shell script that runs at the beginning of the build project that creates a new keychain, imports the certificates for distribution, copies the mobileprovision to the correct Library folder and unlocks the newly created keychain.
If I remove the Crashlytis script from the build phases, it goes back to building fine.
It looks like something happens when the "run" command of Crashlytics is being called, just like if the keychain gets locked up again or just messed up. I'm struggling to find a solution.
Update:
It looks like the failing command from Crashlytics is this one and it's got nothing to do with the GUI:
2014-04-28 09:40:45.004 run[54378:507] Crashlytics.framework/run 1.3.6
2014-04-28 09:40:45.033 run[54378:507]
Crashlytics: Src root /Users/jenkins/dev/workspace/megared-ios/Megared
2014-04-28 09:40:45.033 run[54378:507]
Crashlytics: Current directory path /Users/jenkins/dev/workspace/megared-ios/Megared
2014-04-28 09:40:45.035 run[54378:507]
Crashlytics: Run script build phase called from Xcode Bots 0
2014-04-28 09:40:45.036 run[54378:507]
Crashlytics: Run script build phase called from Xcode.app 0
2014-04-28 09:40:46.612 run[54378:507]
Crashlytics: Could not be onboarded statusCode 404
2014-04-28 09:40:49.805 run[54378:507]
Crashlytics: Uploading dSYM at path /Users/jenkins/dev/workspace/megared-ios/build/Megared Stage.app.dSYM
2014-04-28 09:41:39.635 run[54378:507]
Crashlytics: Uploading dSYM at path /Users/jenkins/dev/workspace/megared-ios/build/Megared Stage.app.dSYM
2014-04-28 09:42:02.295 run[54378:507]
Crashlytics: Megared Stage.app.dSYM could not be uploaded statusCode 0 Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x10026a490 {NSUnderlyingError=0x1002add30 "The request timed out.", NSErrorFailingURLStringKey=https://api.crashlytics.com/api/v1/1fc7b0115d986225bd4df420f1a979cd6114256d/dsyms, NSErrorFailingURLKey=https://api.crashlytics.com/api/v1/1fc7b0115d986225bd4df420f1a979cd6114256d/dsyms, NSLocalizedDescription=The request timed out.}
Command /bin/sh failed with exit code 1
Sounds you need to run Jenkins in a GUI session. You seem to have installed Jenkins to run as a background daemon where it has no access to GUI to draw windows or access any of the services a GUI application needs. I made https://github.com/stisti/jenkins-app for this purpose. Or you can just run "java -jar jenkins.war" in a Terminal window.