Android: attempted to redefine property 'source' error

I’m struggling to get my app to load on android.
works fine in iOS I keep getting this error. the full error is:

Attempted to redefine property ‘source’. (http://10.0.1.9.19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false:106895)

in order to get the app to render at all I had to comment out pretty much everything back to App.js where I could get a basic “hello world” running.

I’m afraid I should’ve been checking it on the android emulator more frequently. I’ve mostly been using iOS sim.

oh, also:
I’m using expo XDE 23.0.0
react-router-native
genymotion for emulationI think my device is a nexus 5 I’ve tried several os versions, 4.1 - 7.1

You probably have a syntax error, somewhere in your code you could be declaring source multiple times within the same scope. :confused:

while I don’t doubt the likelihood of that, why would it run fine on iOS?
also, someone else set up the environment and I kind of inherited it so I’m not super sure how things are configured but as far as I can see that address is what the debugger should be running on. I’m using react-native-debugger

I had the same problem once. You can debug with exp --strict it will take longer to reload but it should surface all the bugs! :lady_beetle:

sounds worth trying for sure. can you clarify, since I’m using react-native-debugger, where would I incorporate that command? can I just run it before starting up the debugger?

  1. Open the terminal
  2. Navigate to the root folder of your expo project
  3. Run exp start --strict
  4. Open a new tab
  5. Run rndebugger://set-debugger-loc?host=localhost&port=19001 this is because you need to tell react-native-debugger which port expo is running on “19001”

Apparently when you get it working it’s “AWESOME”

sweet!, thanks a lot man;)

1 Like