Expo Error outputs not showing directories or source - react-native

Been using react-native with expo. At some point in the project (i.e. it worked when I started the project) the error outputs shift from showing details (specifically the file and/or component names in the code) to replcing the names with (seemingly) random letters.
An example of it working
Example of working error response from tutorial I follow
Here are som examples of it not working
Strange Error response 1
Strange Error response 2
I have been uninstalling and installing some packages (like Ionicons navigations etc). But I cant pinpoint really when this started happening.
Also I use Visual Studio Code

Related

Debug and Hot Reload not working with NativeScript in VS Code

I have just installed NativeScript and the VS Code extension for it, and built a sample 'empty' Vue app as directed.
The build worked with no errors (although took a long time!) and the basic app is running on my Android device. But breakpoints don't work , and changes in the .vue files are not being hot-reloaded to the device. The debug console has
Successfully applied update
whenever i make a change (just a small message text edit) but nothing happens on the device. But I also have this error in the console:
Error when trying to require webpack.config.js file from path 'C:\Users\quilk\source\repos\NStest\nstest\webpack.config.js'. Error is: Error: Cannot find module 'C:\Users\quilk\AppData\Local\Programs\Microsoft VS Code\package.json'
and sure enough, there is no package.json at that location.
Running the command tns doctor reports no errors.
There's a similar question here but it's 4 years old and maybe things have moved on since then?
I can probably work without hot reload, but debugging with breakponits will be essential.

React Native background location (#mauron85/react-native-background-geolocation) - problem installing, how to link modules with Expo managed workflow?

I'm developing a sports app with React Native / Expo which needs to track user background when the app is in the background.
This is related to my previous question (React Native expo-location: How to make the background location service update more often?). I came to the conclusion that the background location tracking in the 'expo-location' package does not seem to sufficiently work, so I started building a new solution based on the package '#mauron85/react-native-background-geolocation' (https://github.com/mauron85/react-native-background-geolocation) which I found was recommended in several tutorials.
So I installed the module and built my map component based on the example code provided in the documentation (https://github.com/mauron85/react-native-background-geolocation#quick-example).
However, when running the app on Expo Go, I get the following error message despite doing all the required imports:
Component Exception: RNBackgroundGeolocation is undefined
This appears to be caused by a problem in linking modules, which I failed to do during the installation. The component requires to do linking of modules with the following command:
node ./node_modules/#mauron85/react-native-background-geolocation/scripts/postlink.js
Because I use Expo managed workflow, I lack the folder structure (./android/settings.gradle etc) required by this script and receive an error of 'android/settings.gradle not found'. Based on some searching, this seems to require running 'expo eject' on the whole project so that I can do configurations in the platform-specific folders.
However, 'expo eject' runs into errors in the "Installing JavaScript dependencies" phase and just returns an error of "Something went wrong ... ...", and the error logs provide no further clarification.
Questions:
How to get forward when something goes wrong in the 'expo eject' phase like this? The error logs get really messy and unclear.
I would really prefer to stay in the managed workflow to avoid any mess. Is there a way to get the modules linking work within the Expo managed workflow?
Any help appreciated, thanks.

React native app sourcemaps show incorrect location of error when error happens in asynchronous code

I have a react-native app. I recently moved to react-native version 0.61.5 for which I took the long route of creating a new react-native app and porting my code over to avoid any linking issues since new version used PODFILE as the default linking mechanism. Ever since I moved to version 0.61.5, I don't get the correct location of code in error logs. I think this is mainly happening when the code is running in asynchronous fashion which most of the code is. For e.g., look at below screenshot:
It is reporting that it is not able to call map on some array which is apparently undefined but the place where the error is reported is completely incorrect. I have no such file in my codebase and it is probably pointing to some file in some react-native package.
I am using Sentry #sentry/react-native": "^1.1.0". I don't think Sentry can cause issue with the sourcemaps reported during development.
I am not sure how to debug this problem. This problem is causing a lot of issues in debugging any errors as I have to manually figure out where the error happened. Please let me know if you have any tips on how to fix this problem.

React Native Example App does not run in Expo Snack

I'm learning React Native and trying to add a component to an Expo Snack for testing. I can't even get the example app to work though.
Is it something different about how Snacks work vs. a desktop development environment? I've encountered that type of difference using JSFiddle, for example.
I straight copy-pasted the code from the Github repo into snack.expo.io and it gave me an error:
Device: (946:881) Unable to resolve module 'module://expo-font.js'
Evaluating module://expo-font.js
Evaluating module://react-native-numeric-input.js
Evaluating module://App.js
Loading module://App.js
I've gotten this error before, but I've never been able to figure out why. Is it an issue with the package, which was updated just 7 days ago, or something else? Please advise.
It may be due to missing of node modules in your project compared to the Github project. As the Stack.expo browser won't give us full freedom to install custom modules, I suggest you to download VS Code and open the Github project in it, then do "npm install" from cmd and "react-native run-android/ios".

React Native app builds multiple times rapidly then fails when in production mode in Expo

Despite the app running perfectly in test builds, when I publish the app or put in in production mode the app builds once that takes a while, then several times within short succession as seen below:
After it stops I then receive the errors:
"Module AppRegistry is not a registered callable module (calling
runApplication)"
and
"undefined is not a function (evaluating
'babelHelpers.objectDestructuringEmpty(d.actions)')"
I have looked up this issue and found that those 2 error messages tend to be vague "catch-all" errors, however none of the posts I found had the rapid build issue I have, so that may a key part to solving this. I have tried restarting the app several times, npm install-ing, updating react and expo to their latest versions, and other small non-code related fixes however none have worked.
Here is a link to my repo: https://github.com/tc1240/AT-Assist. If anyone has had this or can take a look at my code any help is appreciated. Thank you,
Also this is my first question asked on stack so I apologize in advance if my question does not follow some of the guidelines.
I've been experiencing this lately, since I tried publishing for Android and iOS.
I'm currently unable to build additional projects in Expo other than the one I'm working on, so I can't test your project, but:
Can you add the android.package key in your app.json file and try running again? Restoring this back into my project seemed to fix the issue for me.