I get this error when I try to use react-native-track-player in expo
TypeError: null is not an object (evaluating ‘TrackPlayer.RATING_HEART’)
Invariant Violation: “main” has not been registered. This can happen if:
*** Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.**
*** A module failed to load due to an error and AppRegistry.registerComponent wasn’t called.**
I deployed using expo-dev-client
Would you know what could be the problem?
Related
I'm updating a React Native app to EAS Build, after using expo build for several years. The app works via the development server.
After running eas build, the .apk file builds successfully, but immediately crashes when opened on a device.
My error log is:
TypeError: undefined is not an object (evaluating 't.indexOf')
Running "main" with {"rootTag":1}
Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
Has anyone run into this error?
I also had problems, but after reading the documentation some things changed.
Are you migrating an Expo managed app from "expo build"? Learn about the differences.
They must create an index file (reference), with:
import { registerRootComponent } from 'expo';
import App from './src/App';
registerRootComponent(App);
(If the App.js is in the root, delete the /src so they have ./App)
And then, from the package.json, delete the entire line of main.
And [this is the most difficult step]
(https://docs.expo.dev/build-reference/migrating/#metroconfigjs--must-export-the-entire-default
, it cost me
i have the same problem
Invariant Violation: "main" has not been registered. This can happen if:
Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
A module failed to load due to an error and AppRegistry.registerComponent wasn't called.
Hello I tried following this tutorial (
https://www.javatpoint.com/react-native-create-material-top-tab-navigator)
to create a top tab navigator but I am getting these errors.
TypeError: undefined is not a function (near '...(0, _reactNavigationTabs.default)...')
And
Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
I have tried restarting and my emulator, and changing the import statements but still no luck.
I tried searching for solutions online but the errors are still there.
I am a complete beginner, please help? I am running an android emulator and using vs code.
Cloned the project from Git and started it with react..
Did not do any changes in the code for the project as I just wanted to run it using react..
but I got the following error in the emulator..
Application biqComponentApp has not been registered. This is either due to require() error during initialization or failure to call AppRegistry.registerComponent.
I am using windows 7 but same project up and running without any problem for colleagues with mac computers.Not sure whether it is a problem in the project with windows or any installation problem in windows..
please help to find the issue..
Error in the emulator
Make sure you don't have any other react-native/node process running in another terminal. If you do, close it and then re run it, it works for me.
or else
It could be an error caused by not matching name of project and your registered component.
You have created a project with a certain name, example:
react-native init biqComponentApp
But in your index.android.js file you register other component
AppRegistry.registerComponent('Bananas', () => Bananas);
When it must be
AppRegistry.registerComponent('biqComponentApp', () => Bananas);
I was able to run my Angular-Meteor Cordova application no problem until I made a minor change. Now whenever I run meteor run android-device it tries to start the application on the device but when it starts has trouble loading the packages. This is the log out put:
=> App running at: http://localhost:3000/
=> Started app on Android Device.
I20160308-12:51:21.879(0) (android:http://meteor.local/packages/angular_angular.js:1) Uncaught SyntaxError: Unexpected token <
I20160308-12:51:21.954(0) (android:http://meteor.local/packages/angular_angular-animate.js:32) Uncaught TypeError: Cannot read property 'noop' of undefined
I20160308-12:51:21.955(0) (android:http://meteor.local/packages/angular_angular-sanitize.js:42) Uncaught TypeError: Cannot read property '$$minErr' of undefined
I20160308-12:51:21.955(0) (android:http://meteor.local/packages/angularui_angular-ui-router.js:49) Uncaught TypeError: Cannot read property 'isDefined' of undefined
I20160308-12:51:22.359(0) (android:http://meteor.local/packages/driftyco_ionic.js:13355) Uncaught ReferenceError: angular is not defined
...
Oh, I should say this runs on the desktop fine.
----- Update -----
I've inspected the WebView with Chrome and weirdly enough the offending file angular_angular.js seems to contain HTML! See picture below:
This is totally different from the contents of the same file on the desktop, which contains valid javascript.
After inspecting the webview via Chrome I discovered the mobile was using old application files. Answer was to go into the settings -> apps -> myapp and clear the cache/local files.
I thought this would have been expired by meteor but it's not the case. Or perhaps it didn't do it one time because of an error. I'll find out soon enough, but if not I'll have to figure out a way to stop the caching of obsolete files.
I have been trying to port my first iOS app to Android with apportable.
I have solved alot of warnings and errors but cannot get rid of this last one.
The App I made is a fitness application for jogging so it uses CoreLocation.
Everything looks good when I run apportable now except this last error:
Build/android-armeabi-debug/com.apptonix.easyrunner/testTabbedWithCore/libtestTabbedWithCore.a(DetailViewController.m.o):/Users/peterbodlund/Documents/xcodeprojects/Training/inlamning5/testTabbedWithCore/testTabbedWithCore/DetailViewController.m:function L_OBJC_CLASSLIST_REFERENCES_$_114: error: undefined reference to 'OBJC_CLASS_$_MKPinAnnotationView'
scons: * [Build/android-armeabi-debug/EasyRunner/apk/lib/armeabi/libverde.so] Error 1
scons: building terminated because of errors.
Exception AttributeError: "'NoneType' object has no attribute 'pack'" in > ignored
Usually this is an indicator that there were link errors. Check your output higher up and look for missing symbol errors.
The build log is confusing because the build is parallel by default.
Add the option -j1 to cause the build to stop immediately after the first error.