DeviceInfo native module is not installed correctly - facebook

So I tried implementing Facebook Login and followed all the steps accordingly. After having errors with FBSDKcorekit/FBSDKcorekit.h' file not found, I decided to pivot over to working on other components.
Lo' and behold, I have this error giving me trouble now. I followed along with this video: https://www.youtube.com/watch?v=rAXVKapP5cM&t=458s where I used the react-native install react-native-fbsdk and react-native link react-native-fbsdk commands in my terminal.
If it helps, I'm getting the following compile error in my terminal:
The following build commands failed:
CompileC /Users/someUser/desiredProject/ios/build/Build/Intermediates/RCTFBSDK.build/Debug-iphonesimulator/RCTFBSDK.build/Objects-normal/x86_64/RCTFBSDKGraphRequestManager.o RCTFBSDK/core/RCTFBSDKGraphRequestManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
I'm not sure if it was the tinkering around with the react-native-fbsdk or making links to it that caused this error. Note my project was working before I was trying to implement Facebook Login and using the link command.
What's going on here?
Thanks in advance for your time and patience.
edit: Also I did not implement any of the Facebook login code yet since I couldn't get a successful build on Xcode.

#kdizzle Make sure you have the right packager running in the terminal, sometimes you may have a packager associated with another react native project running, this happens because when you stop running an xcode RN project, it doesn't stop the packager in the terminal, and when you start/open another RN project in xcode, it simply checks if a packager is running, doesn't check if it's associated with the current project. So make sure you stop all of the packager instances in the terminal and then open the RN project again.

This may happen when upgrading a project to a newer version of react-native. To fix it,
Stop your packager.
Quit your iOS/android simulator.
Reinstall your modules: rm -rf node_modules && npm install
Restart your packager and simulator, e.g. react-native run-ios

I had this issue and it happened when I changed Hardware within the simulator. To fix it I had to kill the packager and run 'react-native run-ios' again. It didn't happen all the time but when it did this fixed it for me!

Another use is in a Brownfield App. Check your iOS and/or Android react-native versions. If they don't match exactly you will see this error screen too.
For example: I had a react native instance running 0.45.1 while Android had 0.45.0 installed. The solution for me was to make sure everything was running the same version.

None of the above answers have worked for me, so I researched the 'react-native' options a little and ended up:
Deleting the iOS and android folders from the app directory altogether
Running 'react-native eject'
Re-running 'react-native run-ios'
After that the iPhone emulator seemed to have no problem with the app.

This problem would appear when React Native libraries in ios project can not found.
I happend to meet this problem when i update my react-native version from 0.42 to 0.44, and cause that a file named RCTConvert+Map disappear in 0.44, so i update my pod.
command: pod update

Related

Mobile app crash after flutter update. What to do?

After a recent flutter update, my app stopped working. Throws out from the mobile application. Can you help me? I have got this error:
adb: failed to install /Users/User/Desktop/project/build/app/outputs/flutter-apk/app.apk: Failure[INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.package.name: signatures do not match previously installed version; ignoring!]
Before that everything worked. I don't know what to do, please help. The command adb uninstall <package_name> won't help. The project is already on Google Play
I tried reinstalling. Install the original version of the mobile application. update all dependencies, but nothing helped
that's because it's different from the previous version you can see in a similar case here

Got the "Error launching application on" after flutter run

I am flowing the official tutorial to install flutter and run the default app on my iPhone Device. After I execute the flutter run, the app is installed and launched on my iPhone but the logs show the bellow error. How do I solve it?
Launching lib/main.dart on My iPhone 6 in debug mode...
Automatically signing iOS for device deployment using specified development team
in Xcode project: XXXXXXXXXX
Running Xcode build...
└─Compiling, linking, and signing... 50.2s
Xcode builds done. 90.1s
Installing and launching... 41.1s
Error launching the application on My iPhone 6. <-- Error Here
It happens that there are some process needed to Flutter plugin correctly run on physical devices. I struggled with that and finally found that the processes idevicesyslog and iproxy were being silently blocked by MacOS.
You may have noticed already a message liked this:
or a similar one for idevicesyslog.
Once I went to System Preferences -> Security & Privacy in General tab and allowed this apps, everything works. Note that this screen shows only the last app that you tried to run. So I'd recommend that you run flutter app with preferences opened so you can (hopefully) see the messages appearing and click allow.
MacOS may warn you one more time about the file being downloaded from the internet. Just click open and you're good.
The error do not show again after reboot the iPhone.
Same error -- Running fine through Xcode, when I ran with flutter CLI, the app would open, but the terminal log output would crash with the error as in the post.
I ran flutter update and simultaneously turned iPhone off and back on. After doing that, the below popup appeared (on mac).
I believe after the install finished, I ran the below (which I ran several times before updating flutter and installing the popup):
flutter clean
rm -rf ios/Pods
flutter pub get
cd ios && pod install && cd ..
run the flutter app using flutter run from command line, then the MacBook will ask for permission to open the app and app runs,
(lldb) warning: libobjc.A.dylib is being read from process memory. This indicates that LLDB could not find the on-disk shared cache for this device. This will likely reduce debugging performance.
Error launching application on device-XXXXX.
Building & Replace with a newest version ios-deploy solved problems list aboved. Flutter SDK bundled a pre-built command ios-deploy in __PATH_TO_YOUR_Flutter_SDK_/bin/cache/artifacts/ios-deploy/, just replace it.
Please reference to: Flutter Error launching application on device issue .

My Ionic app works fine on browser but does not open in my phone

my ionic project works fine with ionic serve --lab ,but while copied the.apk file in build folder to my phone and install the app but blank screen appears ,
Please can anyone suggest what might be my problem
my app is using google maps,key is provieded for both app and browser in index.html
Have you tried running it in the emulator ? Since its much easier to see the error logs . Try ionic emulate android -l or ios -l (whichever OS you are building for) and then once the execution starts run the command consolelogs it will log all the activity and you will have a better understanding about why its not working.
+1 for using Chrome Remote Debugging feature. It give you the same output as you would receive from running you app in the browser.
Additionally, I have found that sometimes if your app is already compiled, the ionic CLI doesnt always copy your current files into the APK, and uses the older cached files instead. If you are banging your head against the wall, run the following commands to make sure you have your latest code in your APK.
ionic platform remove android
ionic platform add android
ionic run android
I suggest you use the Chrome Remote Debugging feature. I encountered the same, and looked for answers to my symptom for hours. Once I connected to the chrome remote debugger, I got the console.log back, and noticed there was a problem in my routing setup.
It was a problem with ionic CLI. I've updated it to the latest and reinstalled all dependencies.

Cordova loading app into android emulator

I am totally new to Cordova, but now I have installed Cordova with NPM and installed Android SDK and set up an AVD which seems to work perfectly, until I want to emulate my project. Where the actual app for some reason is not loaded into the emulator.
The following action is done:
marvin:HelloWorld$ cordova -d emulate android
cordova library for "android" already exists. No need to download. Continuing.
Wrote out Android application name to "HelloWorld"
Wrote out Android package name to "com.example.hello"
Calling plugman.prepare for platform "android"
Preparing android project...
Processing configuration changes for plugins.
Iterating over installed plugins: []
Writing out cordova_plugins.js...
Running on emulator for platform "android" via command ""/home/marvin/Development/projects/HelloWorld/platforms/android/cordova/run" --emulator" (output to follow)...
Then it start Android emulator up, but the app is not there. Does anybody have a suggestion to fix this issue, so I am capable of actually testing in my emulator?
Thank you in advance.
I just had the same problem, and I was missing PATH to platform-tools in android sdk folder, after I added it everything was in place.
I had the same problem as well; I could run the cordova emulate android command just fine, and the emulator would eventually start up and function, however, the test app was never installed on the device. I was not getting any errors from the Cordova CLI or the console or anything.
I found that there is a bug report about this issue here: https://issues.apache.org/jira/browse/CB-4285
Two solutions have been found for this issue:
1. Make sure you are using an Oracle JDK and not an IBM JDK, and
2. Make sure the AVD that emulate starts up has a min-target-sdk set to API 10 (Android 2.3.3) or higher. (This was my problem.)
Sometimes it works deleting the previously installed version of the app in the emulator. For this you could also launch it with the option "Wipe user data" checked.
Just for the record, none of the other solutions worked for me.
I had the same issue. Following solved it for me.
Make sure that API level of your AVD is greater than minSdkVersion specified in config.xml specified in your cordova app.
If anyone still having this issue:
I had a same problem with device being offline.
if ddms is running it looks after connected devices.
adb kill server
and than run ddms
Also make sure your app id doesn't begin with a number or any other character like "_". For example, if your app id is com.4company.MyApp or com._company.MyApp it just won't load on the emulator. The first one is because Java doesn't allow names beginning with a number, and the second one I guess it's a Cordova thing.
You should also use adb logcat to show the emulator errors on the command line.
For me, the app was not starting up because I had a second emulator running in the background. Uninstalling bluestacks (android emulator for windows) fixed the issue in my case. Running "adb logcat" should tell you if you have multiple emulators running.
I just had the same problem, and It was my emulator device that was with the API 15. Just updated to API 17 and the problem solved.

Re-installation failed due to different application signatures

I moved my Android project to a laptop and now I get this when I hit Debug. Sounds like this is a bug? This shouldn't happen via Eclipse as far as I know.
Re-installation failed due to different application signatures.
The weirdest thing is this happened after I upgraded sdk/adt and Eclipse to support SDK 2.2 It was working fine earlier, and now it doesn't, so it might be a bug.
It happens because keystores on your laptop and original pc are different. it's called debug.keystrore
and located in %USER_HOME%/.android/ folder. TO be more specific it happens because eclipse tries to push apk with reinstall key. So you have two options
Share debug.keystore between various development pc's
Manually uninstall your apk from device ( using adb )
I also got the same problem and fixed it. you should do the following to fix it,
Uninstall the application from your mobile if you load it
already.
To uninstall goto settings->application->manage application.
Run the application again and choose the mobile
Hope this will help you
After you copy debug.keystore to your PC, you need to rebuild project on PC.
I had the same issue using the Droid emulator. I solved it by uninstalling the package from the application settings in the emulator as you would a normal device. On the next run, it reinstalled and the error went away.
I got the same problem and fixed it by just wiping the user data on the emulator. My guess is that the emulator keeps the project installed unless you wipe the data, so if your new project doesn't match some internal parameters it doesn't like it and won't reinstall it.
I also had the same problem and fixed it by uninstalling the app and reinstall it again.
ah i think i found your answer:
Why does the app signature change in Android after a classpath change?
its changed if you change the classpath
After searching and checking the phone, i came to know that i am currently developing 2nd version of this application which is already downloaded from android market in my phone, now as this app is signed and having different signatures this is throwing the above error.
Now, to resolve this issue, i had just uninstalled the app from mobile and run/install the application again.
I had the same issue with the emulator and i ran the command "adb uninstall TheNameOfPackage". Of course you must first go to the directory where the adb.exe has been installed, usually C:\Program Files\Android\android-sdk\platform-tools, and then run the above command.
For me after I copied all of my keystore files from my machine at home, I had to do a Project->clean. After that it worked perfectly.
When i tried to uninstall the application from my device after this issue occurs, i cannot able to find the app in my device. I don know where it gone. Then i uninstalled using adb,
adb -d uninstall <app package name>
This is the answer who are facing the issue similar to my problem.
I had the same issue.
To fix it I uninstalled the old .apk of the project from my device.
Go to device/emulator Settings -> Apps, find your app and uninstall it.
Or
In Android Studio open tab "Gradle" (on the right side), open:
appName
..appName
...Tasks
....install
.....uninstallAll
and click twice on this task to execute it.
Important note:
If you still get this error after uninstalling, try to Build->Clean Project.
If you still get this error, even if in your device Settings->Apps list you have no this app already, try to Build->Clean Project