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

Cannot read property 'appVersion' of undefined #236

Closed
longpq18 opened this issue Sep 28, 2017 · 24 comments

Comments

Projects
None yet
@longpq18
Copy link

commented Sep 28, 2017

[Android]
My react-native:
react-native-cli: 2.0.1
react-native: 0.45.1

@athomaj

This comment has been minimized.

Copy link

commented Sep 30, 2017

Happened to me on simulator, I just had to restart it.

@baijunjie

This comment has been minimized.

Copy link

commented Oct 16, 2017

Same question at 0.49.3

@calcazar

This comment has been minimized.

Copy link

commented Nov 8, 2017

Seeing this on react-native: 0.49.5

deviceInfo.getVersion();

@MrToph

This comment has been minimized.

Copy link

commented Nov 8, 2017

Same issue RN 0.46.3

@ap-simplesystems

This comment has been minimized.

Copy link

commented Nov 9, 2017

Same issue React Native 0.44.2

@jaschaio

This comment has been minimized.

Copy link

commented Nov 10, 2017

Same issue. Actually no method works as deviceInfo itself is undefined. Using React Native 0.50.1

@rajeshpanwar007

This comment has been minimized.

Copy link

commented Nov 15, 2017

+1

1 similar comment
@donnes

This comment has been minimized.

Copy link

commented Nov 17, 2017

+1

@mikefrancis

This comment has been minimized.

Copy link

commented Nov 22, 2017

Same problem for me, in the meantime I am just using the following:

import { version } from '../../package.json';
@GantMan

This comment has been minimized.

Copy link
Member

commented Dec 7, 2017

Can someone verify that master now works for them? Fixing the issue above?

@vysotsky

This comment has been minimized.

Copy link

commented Dec 8, 2017

@GantMan the latest commit from master still doesn't work

@rajeshpanwar007

This comment has been minimized.

Copy link

commented Dec 9, 2017

Hi All,

I created the project using expo and then detached the project.
In my case my expo module was using 9.8.0 version of play-services-gcm but react-native-device-info was using latest version of play-services-gcm.

Solution :

  1. Option
    I forked the react-native-device-info and set the 9.8.0 version of play-services-gcm and it worked for me and directly installed the module from github.

For reference, my forked github repo:
https://github.com/rajeshpanwar007/react-native-device-info

  1. Option
    If you are not able to fork, set version and installed directly,
    a). Just simple add below line in under dependencies in package.json
    "react-native-device-info": "git+https://git@github.com/rajeshpanwar007/react-native-device-info.git",
    b). Run npm install react-native-device-info
@sfratini

This comment has been minimized.

Copy link

commented Mar 28, 2018

Can we re open this issue? I am having the exact same problem. All the modules are undefined and I have no idea why. I have tried many things, including manual link and forcing GCM version.

@machour machour reopened this Mar 28, 2018

@machour

This comment has been minimized.

Copy link
Collaborator

commented Mar 28, 2018

Reopened, please share more details about what you've tried

@sfratini

This comment has been minimized.

Copy link

commented Mar 28, 2018

@machour This was my bad actually. I tried Android Studio and it worked and I could not understand why RN assembleDebug was not. I forgot that I fixed another issue by changing the build directory and I had an automatic script installing the APK and it was using the old directory, so I was reinstalling the old APK without the library.

Everything working right now by installing the correct APK. You can go ahead and close this one, sorry. Leaving the explanation in case this happens to someone else.

@machour

This comment has been minimized.

Copy link
Collaborator

commented Mar 28, 2018

No worries mate, glad you found out the problem

@machour machour closed this Mar 28, 2018

@afilp

This comment has been minimized.

Copy link

commented Apr 2, 2018

I have the same problem in Android, none of the methods work. It says Cannot read property "bundleId of undefined` and I have linked properly.

@machour

This comment has been minimized.

Copy link
Collaborator

commented Apr 2, 2018

@afilp could you open a new issue describing what you did?
From what I can see, linking have failed.

@afilp

This comment has been minimized.

Copy link

commented Apr 3, 2018

@machour I have re-linked manually and it works. I am on Windows and the compile code is not inserted automatically, not sure why.

@aaveidt

This comment has been minimized.

Copy link

commented Oct 10, 2018

after relinking and still doesn't work.

@hpmax00

This comment has been minimized.

Copy link

commented Oct 16, 2018

same problem with 0.55.4

@hpmax00

This comment has been minimized.

Copy link

commented Oct 16, 2018

It is ok, after rnpm link

@roysG

This comment has been minimized.

Copy link

commented Oct 30, 2018

Same problem

@machour

This comment has been minimized.

Copy link
Collaborator

commented Oct 30, 2018

Please don't comment on closed issues. Open a new one a follow the template to give us all details.

@react-native-community react-native-community locked as resolved and limited conversation to collaborators Oct 30, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.