Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected token '.' no stack #23669

Closed
remigarcia opened this issue Feb 27, 2019 · 5 comments
Closed

Unexpected token '.' no stack #23669

remigarcia opened this issue Feb 27, 2019 · 5 comments
Labels
Bug Platform: Android Android applications. Platform: Linux Building on Linux. Resolution: Locked This issue was locked by the bot.

Comments

@remigarcia
Copy link

🐛 Bug Report

When i'm running react-native run-android while an emulator is on, everything is fine, my app is correctly running.
But when I've got my device connected via USB and I make the same command, the app builds, installs, but I have the following error :
image

To Reproduce

  • running react-native run-android on a connected device

Expected Behavior

The app should run correctly

Environment

  React Native Environment Info:
    System:
      OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
      CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
      Memory: 1.86 GB / 15.54 GB
      Shell: 5.4.2 - /usr/bin/zsh
    Binaries:
      Node: 8.15.0 - /usr/bin/node
      Yarn: 1.12.3 - /usr/bin/yarn
      npm: 6.7.0 - /usr/bin/npm
    IDEs:
      Android Studio: 3.3 AI-182.5107.16.33.5264788
    npmPackages:
      react: 16.6.3 => 16.6.3 
      react-native: 0.58.4 => 0.58.4 
    npmGlobalPackages:
      react-native-cli: 2.0.1

package.json :

{
  "name": "myApp",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "buffer": "^5.2.1",
    "private-dependency": "git+ssh://git@github.com:private/dependency.git",
    "isomorphic-fetch": "^2.2.1",
    "jwt-decode": "^2.2.0",
    "lodash": "^4.17.11",
    "moment": "^2.24.0",
    "object-path": "^0.11.4",
    "react": "16.6.3",
    "react-native": "0.58.4",
    "react-native-gesture-handler": "^1.0.15",
    "react-native-paper": "^2.11.1",
    "react-native-share": "^1.1.3",
    "react-native-vector-icons": "^6.3.0",
    "react-navigation": "^3.3.0",
    "react-redux": "5.0.5",
    "redux": "3.6.0",
    "redux-form": "7.3.0",
    "redux-persist": "^5.10.0",
    "universal-url": "^2.0.0"
  },
  "devDependencies": {
    "babel-core": "^7.0.0-bridge.0",
    "babel-jest": "24.1.0",
    "jest": "24.1.0",
    "metro-react-native-babel-preset": "0.52.0",
    "react-test-renderer": "16.6.3"
  },
  "jest": {
    "preset": "react-native"
  }
}
@react-native-bot react-native-bot added the Platform: Linux Building on Linux. label Feb 27, 2019
@ericlewis ericlewis reopened this Mar 7, 2019
@dulmandakh dulmandakh added the Platform: Android Android applications. label Mar 17, 2019
@kelset
Copy link
Contributor

kelset commented Mar 19, 2019

Hello there 👋 this issue doesn't have a repro (which means, a react-native init-ed project with the minimal changes that leads to creating the same issue you are reporting). Unfortunately, I have no way of helping you in a meaningful way – there is no easy way for me to recreate the situation and check that the issue reported is still there when changing the code.

The only suggestion that I can give is that maybe it has something to do with the bundler...? Probably upgrading to 0.59 is the best strategy to try and fix this.

Because of this, we are going to close this issue - but if a repro is shared, we are happy to reopen it 🤗

@jraleman
Copy link

I know I'm late into the conversation, but I also encountered a similar error:

unhandled js exception unexpected token ': ' no stack

The issue that I had was that I had an extra colon in one of my json files, something like:

"key":: "value",

Hopefully someone finds this useful in the future, it sucks being stuck in a silly issue for a bit :p

@mjm918
Copy link

mjm918 commented Nov 22, 2019

In my case, unexpected toke '<' no stack

But surprisingly it happens only when I run on Android 9

@urska19
Copy link

urska19 commented Nov 28, 2019

It's happening the same to me as @mjm918 and only on Android 9.

@VidyaCK
Copy link

VidyaCK commented Dec 4, 2019

I resolved this issue by turning on USB debugging in the android device.

@facebook facebook locked as resolved and limited conversation to collaborators Mar 19, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Android Android applications. Platform: Linux Building on Linux. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

9 participants