Getting a flipper error log while i am trying to run ios app from xcode.
flipper: Desktop failed to provide certificates. Error from flipper desktop:
rsocket::StreamInterruptedException: connection error
App is working smoothly, no issues found. But this log is coming in every 1 second.
Is there any way to fix this issue?
I had the same issue and I finally found a way to resolve this.
I assume you're getting this error when you try to debug your app with a real iOS device.
These are the steps I took.
You need to run Flipper Desktop on your background. It has an integrated React-devtools plugin. Download it from fbflipper.com. Follow the instructions on their docs it's simple and quite straightforward.
At this point you won't have the same error message. (It will say that the certificate is ok.) However, if you encounter any issues with idb binary location (which I did on my M1 machine), this new message will pop every second and Flipper interface will tell you that the device is not found. Just make sure to find the right idb binary location and configure it, restart Flipper, and this will be resolved one and for all. Mine was in "/opt/homebrew/bin/idb".
TL: DR;
idb_companion was built for newer Swift enviroments, but I was still using Big Sur. After upgrading my MacOS, Flipper managed to connect to my iOS device fine.
Of course I explain below that I build idb from the source to match the version 1.1.8 for both idb_companion and idb.
Below I also explain how I found the error that was crashing idb_companion preventing Flipper from maintaining a stable connection and restarting several times yielding the message: [conn] ... restarted 4 times in 20 seconds.
What I learned:
idb_companion runs on my Mac in the background as a server that knows how to control or get logs from iOS physical devices;
idb is a command line interface that Flipper can use for communicating with idb_companion.
I was able to install idb_companion#1.1.8 using Homebrew. But I was not able to install the same version 1.1.8 for the cli (aka idb (aka fb-idb)).
So I decided to build the idb from the github repo. The command line for building it was
pip3.9 install .
First I struggled with an error related to grpclib version. Apparently idb required the version 0.4.1 but I had 0.4.3 installed. To downgrade grpclib I used the following command:
pip3.9 install grpclib==0.4.1
I also tried to make sure there was no other grpclib installed in other python version, so I ran a bunch of
pip3 install grpclib==0.4.1
pip3.7 install grpclib==0.4.1
pip3.9 install grpclib==0.4.1
To see which version of python I had, I ran a bunch of
which pip
which pip3
which pip3.6
which pip3.7
which pip3.8
which pip3.9
which pip3.10
Anyways...
As I was randomly trying to build idb with those different python versions, with and without sudo, I also faced the following error, which was fixed just by adding sudo again to the build command.
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/Users/alexandrelage/Library/Python/3.9/lib'
Check the permissions.
Anyways...
Basically after fixing the grpclib requirement, pip3.9 install . inside the source folder was enough for building idb (client, on version 1.1.8).
Of course I had to go to Flipper >> Settings and update the idb path. All seemed good.
Unfortunately that was not enough, Flipper kept on trying to connect to my iPhone device with no success. Then I copied the idb command Flipper was trying to run:
/Library/Frameworks/Python.framework/Versions/3.7/bin/idb file pull --log DEBUG --udid 00008020-000A7D2C36DUMMYDUMMY --bundle-id org.reactjs.native.example.MyExample 'Library/Application Support/sonar/app.csr' '/var/folders/r6/xrp3nw8j4wj45mvdpnlzlv740000gn/T/tmp-10199-CW6olKXUvwek/app.csr'
I was lucky to run the command above while I was also running idb_companion on another tab. The command I used to manually start idb_companion was:
idb_companion --uidid 00008020-000A7D2C36DUMMYDUMMY
I was lucky because I noticed the idb_companion tab stopped running when I tried to run the idb (client) command above I copied from Flipper. I restarted idb_companion again and tried to run the idb (client) command again. Then I realized idb_companion was crashing with an error message:
...
2022-10-21 18:14:11.853-0300 Starting swift server on tcp port 10882
2022-10-21 18:14:11.854-0300 Swift server started on [IPv6]::/:::10882
{"grpc_swift_port":10882,"grpc_port":10882}
2022-10-21 18:14:11.854-0300 Companion will stay alive if target goes offline
2022-10-21 18:14:30.997-0300 Start of connect
dyld: lazy symbol binding failed:
can't resolve symbol _$sScCMa in
/usr/local/Cellar/idb-companion/1.1.8/bin/../Frameworks/IDBGRPCSwift.framework/Versions/A/IDBGRPCSwift
because dependent dylib #rpath/libswift_Concurrency.dylib could not be loaded
dyld: can't resolve symbol _$sScCMa in
/usr/local/Cellar/idb-companion/1.1.8/bin/../Frameworks/IDBGRPCSwift.framework/Versions/A/IDBGRPCSwift
because dependent dylib #rpath/libswift_Concurrency.dylib could not be loaded
That indicated there was something else going on. It seemed idb_companion was built for a Swift environment different to mine. I looked for this error on Google and realized my XCode was outdated. In fact I was still using Big Sur.
Now I upgraded my MacOS to Montrey, Flipper manages to connect to my iOS device fine. And I haven't even upgraded my XCode yet.
Open Flipper > Settings > Enable physical iOS devices
Just grouping everything together, because I had a hard time with this issue...
Open Flipper. In the lower-left corner, click on the gear icon and then on Settings.
Be sure to enable the "Enable physical iOS devices" option.
On "IDB binary location", you'll probably see an alert sign (⚠️). If that is the case, it means you do not have an idb client or it is not right located.
Follow ALL these steps to install the idb companion and idb client.
If you do not have python install: brew install python3. Then try to repeat step 4.
If everything went right, your idb and idb-companion should be located at "/opt/homebrew/bin". So now you can go back to Flipper > Gear Icon > Settings, paste the path "/opt/homebrew/bin/idb" and the alert sign (⚠️) on the right will disappear.
If you still have the alert sign it means your idb file is not in the right location. There are several alternatives in this git post that solve this issue, so check them out.
Related
I'm trying to develop a React Native mobile app for iOS on Windows 10. Using the react native cli, I've generated a RN iOS project with the standard file structure, including a "Podfile" file with the default RN pods.
However, when I try to use "pod install" in order to add other pods of my own, I get the following error code:
[!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: SSL peer certificate or SSH remote key was not OK
I've been googling this error but I've run into a dead end. I've tried using pod update, I've changed my cURL version, I've gone over the setup instructions for Ruby, curl, and others, and I'm at a loss. What can I do?
Note: I haven't run the app yet, and am trying to install the react-native-mapbox-gl pod first, but I can't even properly install Trunk.
cURL Version:7.70.0
CocoaPods Version: 1.9.3
You won't be able to develop for iOS on Windows – because the iOS SDK and build tools are only available on macOS. No way to legally do it without an access to an Apple computer.
You can try Expo though – it doesn't require macOS for development, but keep in mind that you will be limited to the APIs Expo provides.
As for the actual error – it seems that the CocoaPods rubygem has not been tested on Windows at all, and is likely invoking curl in a way that doesn't account for Windows's SSL certificate management system.
I am getting this while running app on simulator using xCode, version 9.2
I've tried other solution mentioned on Stack overflow & Github S1S2 S3 S4 but most of the solution are mentioned for android.
P.S. This project also includes purescript code explained here Integrate Pure Script in your React Native project
That's how I resolved it.
Terminate your metro bundler > react-native link > react-native run-ios
It was not bundling because of some errors which was not showing in the simulator but just this error was thrown.
create index.js, index.android.js and index.ios.js whith the same content. I do have all of them and it solved my issue
I have also faced the same issue when I changed the name of images saved in my local directory. In my case, I have just restarted metro bundler, deleted the app, and restarted the app. Issue was fixed for me.
Try this:
npx react-native-asset
then:
react-native run-ios
This issue is caused basically when some packages or images are not bundled properly, it might be caused because of improper assets path or internet issue when installing packages or reload issue. The expo bundles into a standalone library so it can be available immediately.
This error does not provide any stack to debug since it does not properly have the bundled data even for error stack.
I have just face few bundled scenarios
Scenario 1 => While the expo is running and we install a new library on fly, few times during this importing the library might not get bundled properly, so it's better to stop the expo and re-run, or try reloading the error in app. This will some time resolve the issue, or if there is some error it will show up the error stack
Scenario 2 => You have a customised asset director or have changed the asset path in app.json file improperly.
Please let me know in comments if there are any other scenarios
I had a metro bundler terminal window opened and whenever I was running npm run ios , it wasn't starting a new metro server, the problem was that. I closed the metro bundler terminal window and ran npm run ios and it opened a started a new metro server and the error was gone
I had a same issue, then I did:
rm -rf node_modules,
npm install
and restarted the metro (npm start). It worked.
In Settings, go to Privacy > Local Network to see a list of every app that requested access. I solved by allowing my app to access to the local network. (Trying to run on physical iPhone device from my mac m1 on the same wifi).
Source
Make sure that when you restart the expo project you do so with expo start -c
-c throws out the cache, otherwise the problem persisted for me.
Can anyone tell me why my app is not installing at all and ending with the error message
Observatory connection never became ready.
the app was working perfectly fine until yesterday .
I have changed the channel to master yesterday in the command prompt and from then on the app never runs.
I even switched back to channel alpha but still no use.
I have attached a screenshot of the command prompt where the installation was stuck forever.
I am not so sure if I need to reinstall the flutter. I am worried if I uninstall the flutter now it may not configure properly and I might break it forever.
Please can someone tell me what exactly might have gone wrong.
Many Thanks,
Mahi
Instead of reinstall try with following: (Mac)
Set Path Variable: via following terminal command
export PATH=~/flutter/bin:$PATH;
that is bin folder path of flutter.
export PATH=[PATH_TO_FLUTTER_GIT_FOLDER]/bin:$PATH
https://flutter.io/setup-macos/#update-your-path
If above not worked. Check with the Dart version
dart --version
Install the latest dart version:
brew install dart --devel
Hope this helps others.
For Mac
open terminal
$ echo $PATH
it will show like this
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:
it means you need to add flutter in to path
Open Finder presss command + shift + G
Put /etc/paths in dialog and press GO
Copy the file "paths" and paste it on desktop
Then open the pasted "paths" file from desktop
and add following line into end of the file "/flutter/bin"
Then copy that file and again paste it on /etc/paths
same like step no 2
it will ask you to replace or not
press replace
Now if you hit $ echo $PATH on terminal it will show
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/swagat/development/flutter/bin
Now your $flutter doctor will work perfectly
The solution is from Google Groups #Flutter-Dev
Thank you very much for your reply #Michael Thomsen.
I've tried what you have suggested and the details are as follows:
When I used flutter run -v command the command prompt output is as follows:
It was stuck for a while at waiting for port connection if I am not wrong.
So I've used AndroidStudio, File>Open and selected android/ folder to run the app then the gradle was showing an error:
Error:Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (25.2.0) and test app (25.4.0) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
I modified the build.gradle(Module:app) to show the correct version of 25.2.0 which was previously showing 25.4.0.
dependencies {
androidTestCompile 'com.android.support:support-annotations:25.2.0'
}
I just saved the changes inside android studio and the gradle sync completed without any errors.
Now I can run the app from inside Android Studio and also from IntelliJ IDE.
Thanks very much Michael this solved my problem.
Reinstalling flutter would be my starting point. If this problem persists, please post the output of $>flutter doctor and a description of what exactly leads to this error.
I just started with react-native development on IOS and want to get my feet wet.
I did the following:
react-native init trail
and I opened the trail starter project in xcode and hit run. There were several small issues I fixed already including upgrading watchman, upgrading OSX. Currently the logs do not show any errors.
While the logs show that the packager runs, the build failed on XCode. A lot of errors showed up with the files in the Library folder. Many of them show up as Parse Issues, Semantic Issues.
I'm currently using Mac OSX Yosemite 10.10.5. Why did the started app fail to build?
Here are some code snippets of the errors:
code snippet 1
code snippet 2
Update your versions of node, npm and xCode.
Run 'react-native init yourAppName';
Run in yourAppNameFolder 'npm i' - to install all needed dependencies, which may be missing;
Run 'open yourAppNameFolder/ios/yourAppName.xcodeproj' where appFolder - folder which one have been initialized by command 'react-native init'.
This should help, and one more suggestion - don't touch this bloody xcode, better to run the app from the shell.
I'm working on a Cordova based mobile application, and wanted to make use of the Cordova CLI's ability to deploy and run my mobile app right from the command line, without having to go into XCode to do the build
When doing:
cordova run ios --device
Cordova graciously tells you that you should install the ios-deploy node module. I did so following the steps on their GIT site.
When I next tried to do a run, I started to get codesign errors, specifically:
/Users/blahblah/platforms/ios/build/device/myApp.app: Permission denied
Command /usr/bin/codesign failed with exit code 1
I couldn't get the code signing to work from Terminal, and worse, going back into XCode resulted in the same error!
Fortunately the error messages says it all: permission denied; I was able to correct this by popping back into Terminal and running a chmod on my entire app folder, i.e.:
chmod -R a+rwx myApp
I could then go back into XCode and get the project building and deploying again (whew!), however if I tried to do the deploy via the Cordova CLI, then same issue would occur.
It seems like the ios-deploy and / or cordova is messing around with the folder permissions, but I'm not sure how to correct this.
Any suggestions would be appreciated!
UPDATE:
To be clear, I am able to successfully sign the app within XCode if I first go into Terminal, and then into the platforms/ios folder and perform a chmod -R a+rwx on the "www" folder.
The problem I'm having is trying to get this to build / sign successfully from the command line.
I've done some further diagnosis, and it seems that the problem is with the Cordova CLI itself, and not with ios-deploy; when I execute:
cordova prepapre
It copies my "www" folder over to the "platforms/ios/www", however it changes the permissions when doing so from everyone having write access (i.e.: drwxrwxrwx) to only my user having write access i.e.: (drwxr-xr-x)
It seems that this is fouling up the codesign application, and is causing my permission denied errors above.
I'm just hoping someone knows how I can work around this, or what I might be doing wrong with my build - I'd prefer not to have to go into XCode to do these builds.
So it turns out that the Cordova CLI is working just fine, as is the ios-deploy npm package.
The problem turns out to be within the solution itself, and has nothing to do with the tools.
I am using the Ionic framework within this particular Cordova application, and their framework installs some "after_prepare" hooks (within the hooks folder) which attempt to help prepare / clean up some extraneous files prior to the build.
One of these hooks (named "020_remove_sass_from_platform.js") was trying to help out by cleaning up unneeded SASS files prior to the build in order to reduce the size of the compiled app.
Unfortunately this hook was adjusting the folder permissions (I guess in order to ensure the delete could succeed), and this was the cause of the "www" folder's permissions changing during a "cordova prepare".
I deleted the hooks, and now the Cordova CLI builds and signs the APK as expected, and the ios-deploy package pushes it to the device, all without using XCode.
Hope this can be of some help to someone else.
Check the CODE_SIGN_IDENTITY property in your build settings. Is your provisioning profile selected there?
You also need to enter a valid bundle identifier in your apps .plist.
The identifier has to match the one you provided when generating the profile.
Try this
sudo npm install -g ios-deploy --unsafe-perm