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

Uncaught TypeError: Cannot convert undefined or null to object #41

Open
lingboz opened this issue Aug 14, 2017 · 17 comments
Open

Uncaught TypeError: Cannot convert undefined or null to object #41

lingboz opened this issue Aug 14, 2017 · 17 comments

Comments

@lingboz
Copy link

lingboz commented Aug 14, 2017

Hi guys
I ran into an error that only happens on devices and simulators (my code works well in browser).

To recreate the error, just create a new blank ionic 2 project,
and then follow angular-meteor tutorial chapter 1 using Ionic CLI to add necessary webpack supports, etc., then add meteor client blunder plugin and do a meteor-client:bundle in your project folder.

When I run my program in Android simulator, the error is as the picture (you can see this in Chrome inspect window) and nothing is loaded in Android simulator. The same things happens with ios.

image

Does anyone else have this issue?

@lingboz
Copy link
Author

lingboz commented Aug 14, 2017

BTW, I used Meteor 1.5.1 and Ionic 3.7.0

@fernandoarevalo
Copy link

Hi @lingboz

I have the same problem, so I created an issue in the Ionic2CLI-Meteor-WhatsApp git repo. I think that this error isn't the meteor-client-bundler, because testing in devices with different os versions, only it works fine on higher versions to android 5.0, but not in IOS and android 4.4.4.

My issue: Urigo/Ionic2CLI-Meteor-WhatsApp#121

@sxxymzy
Copy link

sxxymzy commented Aug 20, 2017

Hi guys, I've got it working by removing the following two dependencies in meteor-client.js.
... _require('core-js/modules/es6.typed.uint8-array'); // line 17020 _require('core-js/modules/es6.typed.uint32-array'); // line 17021 ...
I didn't do much tests to ensure its safety, but I think it might be safe if you don't use TypeArray in code. Hope there will be updates soon.

@habibadeku1
Copy link

@sxxymzy , tried out commenting out those lines of code you stated in meteor-client.js. It still returned the same error on mobile chrome etc. Can you please elaborate on how exactly you went about it. Thanks.

@sxxymzy
Copy link

sxxymzy commented Aug 20, 2017

@hwonda As the error stacks implied, the error is about the uint8-array dependency. So I just go through those call stacks and remove the dependences. Maybe your error is not exactly same as the pictures? Or there might be other issues after you commented those two lines?

@fernandoarevalo
Copy link

Hi guys,
@sxxymzy Thank you for the help, I removed the two lines and work fine. 👏👏👏👌

@mvandenbrink
Copy link

Only had this problem with Safari and iOS. Don't have this problem in Chrome on Macbook and Android. I'm using meteor 1.5.1 and ionic 3.6.0.
Removed the 2 lines ( lines 22584 and 22585) and the app is working again in Safari and iOS. 👍 for @sxxymzy

@mvandenbrink
Copy link

Looked into meteor and found out that these lines were added in 1.5.1-beta.0 and 1.6-beta.24
meteor/meteor@3af4302

@pkitatta
Copy link

pkitatta commented Sep 6, 2017

@lingboz @fernandoarevalo @blackjack0v0 @sxxymzy is any of you using windows? Because I have deleted those two lines (including in the .meteor packages)everywhere on my computer and yet I still get the error.

@lingboz
Copy link
Author

lingboz commented Sep 6, 2017 via email

@pkitatta
Copy link

I am also using windows 10 and its failed to work on mine after removing the lines. Isn't also odd that those two lines are present in the old script that works without a problem?!

I have tried to find @DAB0mB but have failed to get him.

@lingboz
Copy link
Author

lingboz commented Sep 11, 2017

Hi guys, there is a new release from Meteor.
Meteor has 1.5.2 ready. They claimed they fixed some issues about Node.js V8, and supported Cordova 7.0.
What version of Cordova are you using?

https://blog.meteor.com/announcing-meteor-1-5-2-105b53e0debc
Have you guys tried anything about the new release?

@darkbasic
Copy link
Collaborator

@darkbasic
Copy link
Collaborator

A workaround is available: Urigo/Ionic2CLI-Meteor-WhatsApp#124 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
@darkbasic @mvandenbrink @sxxymzy @lingboz @pkitatta @habibadeku1 @fernandoarevalo and others