react-native-console icon indicating copy to clipboard operation
react-native-console copied to clipboard

Sorry, no physical iOS devices found!

Open efstathiosntonas opened this issue 3 years ago • 9 comments

Hi, I'm using version 2022.2.4 and when I try to run on a physical device connected with USB it throws: Sorry, no physical iOS devices found!

Webstorm version: 2022.2.2, Xcode version 13.4.

ps. when running via Xcode everything is fine, if I pick an emulator it runs fine (via rn console). Let me know if you need any further information.

efstathiosntonas avatar Sep 06 '22 11:09 efstathiosntonas

some error logs (line 5 & 6), I have no clue if they're related to the issue:


2022-09-05 17:22:22,666 [103092934]   INFO - STDERR - java.lang.reflect.InvocationTargetException
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at jdk.internal.reflect.GeneratedMethodAccessor1121.invoke(Unknown Source)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.github.beansoftapp.javascript.codeInsight.daemon.impl.JavaScriptUnusedSymbolUtil.isEmptyOrIgnoreName(JavaScriptUnusedSymbolUtil.java:42)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.github.beansoftapp.javascript.codeInsight.JavaScriptJSXCodeVisionProvider$1.collect(JavaScriptJSXCodeVisionProvider.java:102)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.intellij.codeInsight.hints.CollectorWithSettings.collectHints(InlayHintsUtils.kt:91)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.intellij.codeInsight.hints.InlayHintsPass$doCollectInformation$1.process(InlayHintsPass.kt:47)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.intellij.codeInsight.hints.InlayHintsPass$doCollectInformation$1.process(InlayHintsPass.kt:27)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
2022-09-05 17:22:22,667 [103092935]   INFO - STDERR - 	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:86)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - Caused by: com.intellij.openapi.progress.ProcessCanceledException
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.throwIfCanceled(AbstractProgressIndicatorBase.java:157)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at com.intellij.openapi.progress.util.AbstractProgressIndicatorBase.checkCanceled(AbstractProgressIndicatorBase.java:147)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at com.intellij.codeInsight.daemon.impl.DaemonProgressIndicator.checkCanceled(DaemonProgressIndicator.java:97)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at com.intellij.openapi.progress.util.ProgressWrapper.checkCanceled(ProgressWrapper.java:82)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at com.intellij.openapi.progress.impl.CoreProgressManager.doCheckCanceled(CoreProgressManager.java:143)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at com.intellij.openapi.progress.ProgressManager.checkCanceled(ProgressManager.java:219)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at com.intellij.openapi.progress.ProgressIndicatorProvider.checkCanceled(ProgressIndicatorProvider.java:23)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at com.intellij.extapi.psi.StubBasedPsiElementBase.getGreenStub(StubBasedPsiElementBase.java:350)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at com.intellij.lang.javascript.psi.impl.JSFunctionBaseImpl.doGetName(JSFunctionBaseImpl.java:168)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	at com.intellij.lang.javascript.psi.impl.JSFunctionBaseImpl.getName(JSFunctionBaseImpl.java:162)
2022-09-05 17:22:22,668 [103092936]   INFO - STDERR - 	... 24 more

efstathiosntonas avatar Sep 06 '22 11:09 efstathiosntonas

Not related, would you please try run this command in a terminal and copy the output for me: xcrun instruments -s devices

beansoft avatar Sep 06 '22 11:09 beansoft

xcrun instruments -s devices:

xcrun: error: sh -c '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -find instruments 2> /dev/null' failed with exit code 17664: (null) (errno=Invalid argument)
xcrun: error: unable to find utility "instruments", not a developer tool or in PATH

efstathiosntonas avatar Sep 06 '22 11:09 efstathiosntonas

after some googling I've found that the instruments command has been removed from Xcode 13

I'm using react-native 0.68.3

efstathiosntonas avatar Sep 06 '22 11:09 efstathiosntonas

Ok, i’ll do some googing to see if any other way to get the iphone list

beansoft avatar Sep 06 '22 11:09 beansoft

@beansoft hi, any news in this one? Thanks

efstathiosntonas avatar Sep 16 '22 12:09 efstathiosntonas

Hi still no lucky, some one said that one can copy old XCode's instrument exe to new SDK dir, but I've not tried. This is a big change in the XCode SDK side, I'm still looking for if the new version React-Native tools by facebook resolved this issue.

beansoft avatar Sep 16 '22 12:09 beansoft

ok, thanks for the update!

efstathiosntonas avatar Sep 16 '22 12:09 efstathiosntonas

I've found it's not possible to fix this issue as there is broken in react-native 0.70.0 too. For me, by using https://docs.libimobiledevice.org/libimobiledevice/latest/ with their cli util, I can read the device name:

brew install libimobiledevice
ideviceinfo -s
DeviceName: iPhoneXRBean

then if you using command by React Native CLI, by: npx react-native run-ios --device or given a device name:

npx  react-native run-ios --device iPhoneXRBean
Then errors will be thrown by Facebook's tool:
info Found Xcode project "AwesomeProject.xcodeproj"
error Could not find a device named: "iPhoneXRBean". Available devices:
  - MyMac (F5256792-DDDD-DDDD-DDDD-DDDDDDDDD)

So it's not possible to fix it so far, as my tool built on-top of Facebook's Node.JS tool chain. According to https://reactnative.dev/docs/running-on-device#running-your-app-on-ios-devices you have to using Xcode to run in your device. By a temp solution, you can run it through Xcode one time, after that disconnect it, using my tool windows to start the React Packager tool, then double shake in device to connect to the metro server.

beansoft avatar Sep 21 '22 10:09 beansoft