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

Project error on iOS version 10.3.3 and Android version 4.4.4 #121

Closed
fernandoarevalo opened this issue Aug 12, 2017 · 45 comments
Closed

Project error on iOS version 10.3.3 and Android version 4.4.4 #121

fernandoarevalo opened this issue Aug 12, 2017 · 45 comments

Comments

@fernandoarevalo
Copy link

Hi everyone

I am doing the tutorial whit the Ionic 3 Version (Last Update: 15.06.2017). After install it on iOS (Iphone 6 version 10.3.3) and Android (Samsung Galaxy S3 version 4.4.4) devices, i am getting WHITE SCREEN and these errors.

iOS - Xcode console

2017-08-12 17:24:34.407809-0500 MyApp[317:50657] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/8185661C-F89D-438E-8109-53BC4A470722/Library/Cookies/Cookies.binarycookies
2017-08-12 17:24:34.554944-0500 MyApp[317:50657] Apache Cordova native platform version 4.4.0 is starting.
2017-08-12 17:24:34.556014-0500 MyApp[317:50657] Multi-tasking -> Device: YES, App: YES
2017-08-12 17:24:34.854015-0500 MyApp[317:50657] Using UIWebView
2017-08-12 17:24:34.857185-0500 MyApp[317:50657] [CDVTimer][handleopenurl] 0.227034ms
2017-08-12 17:24:34.860531-0500 MyApp[317:50657] [CDVTimer][intentandnavigationfilter] 3.229976ms
2017-08-12 17:24:34.860723-0500 MyApp[317:50657] [CDVTimer][gesturehandler] 0.102997ms
2017-08-12 17:24:34.883088-0500 MyApp[317:50657] [CDVTimer][splashscreen] 22.305012ms
2017-08-12 17:24:34.893854-0500 MyApp[317:50657] [CDVTimer][statusbar] 10.562003ms
2017-08-12 17:24:34.895575-0500 MyApp[317:50657] [CDVTimer][keyboard] 1.525998ms
2017-08-12 17:24:34.895740-0500 MyApp[317:50657] [CDVTimer][TotalPluginStartup] 38.825989ms
2017-08-12 17:24:39.115410-0500 MyApp[317:50697] libMobileGestalt MobileGestaltSupport.m:153: pid 317 (MyApp) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled
2017-08-12 17:24:39.115508-0500 MyApp[317:50697] libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see <rdar://problem/11744455>)
2017-08-12 17:24:42.406886-0500 MyApp[317:50657] Resetting plugins due to page load.
2017-08-12 17:24:43.172301-0500 MyApp[317:50657] Finished load of: file:///var/containers/Bundle/Application/4DBE3351-781F-4A48-93DF-4E8134F24893/MyApp.app/www/index.html

Android - Chrome inspect console

Uncaught TypeError: Cannot convert undefined or null to object      polyfills.js:1

This project has been tested also on

  • Sony Xperia M4 Aqua (Android version 5.0)
  • Lenovo vibe K5(Android version 5.1.1)

and everything works fine.

I really appreciate any help whit this issue. Related whit #120

Regards.

@lingboz
Copy link

lingboz commented Aug 15, 2017

Hi, I also have this issue.

In my browser all things work well however, when I tried both Android Emulator 7.1.1 and 7.0 they generate the same error.

I did not test on Android 5.0 but I will try tomorrow.

Ios simulator in Xcode is not working as well.

The error is very strange because everything worked well on device before.

Just follow this thread if you guys have the same problem

@wilkovanhoek
Copy link

Same issue here as well.

Everything is fine on Chrome/Opera and Android 6.0.

In my case it breaks on Firefox (version 54 - Ubuntu) and CyanogenMod 12.1 (Android 5.1.1). The Android 5.1.1 thing is strange as @fernandoarevalo seems to have no Problem on it, maybe its duet to CyanogenMod.

@lingboz and @fernandoarevalo: could you test if everything works for you on Firefox (regular ionic serve)?

@lingboz
Copy link

lingboz commented Aug 15, 2017

Hi @wilkovanhoek

I tested on Firefox, the error is the same with simulators (as the following picture).
image

Moreover I would like to attach my device error inspected by Chrome as follows, I am using Android simulator 7.1.1 from Android studio

image

They are actually the same errors I guess.

I guess it is not due to the update of Meteor 1.5.1 because the built-in Meteor cordova support is working well and we have not seen many issue reports there.

@habibadeku1
Copy link

I suspect this issue has to do with Ionic App Script 2.1.3, has anyone tried a lower version? I'm away from my project now so I cannot give do this now.

@lingboz
Copy link

lingboz commented Aug 15, 2017

Guys do you think there is something wrong with Ionic 3?

I saw this error when I updated to Meteor 1.5.1 but my colleague is also using Meteor always with Meteor's built-in cordova support and his mobile app works very well with no issues.

I also noticed there is some changes between the generated "meteor-client" files from different versions of Meteor.

@lingboz
Copy link

lingboz commented Aug 15, 2017

@hwanda, I will try downgrade app script to lower versions

@pkitatta
Copy link

Hi, I have the same issue. The interesting thing is that the app was loading about two weeks ago and then one day this error happened. From that day it has persisted. I have tried everything.

@fernandoarevalo
Copy link
Author

@wilkovanhoek, I tried to run the ionic serve in the Firefox and it generates the same error. Also, I tested in android simulator whit 5.0.0 versions but no working, it seems that works fine in devices whit higher versions to Android 5.0.0

@lingboz
Copy link

lingboz commented Aug 15, 2017

Hi @pkitatta @hwonda @wilkovanhoek @fernandoarevalo

I had an interesting test.

I had an code archive several weeks ago and I copied the old "meteor-client.js" to my current project. The error disappeared and my code worked on mobile platforms.

I double checked the differences between the two "meteor-client.js" files and I found a lot of differences.

I don't know if it is because I updated Meteor version to 1.5.1 but, when I run "meteor-client:bundle" to generate a new "meteor-client.js", everything breaks again.

This is absolutely not a good solution because we might lose support forever when we update things.

Have you found any clues how this error is caused?

@pkitatta
Copy link

@lingboz I also suspect it could be a meteor issue. It could be the upgrade.

@fernandoarevalo
Copy link
Author

Hi @lingboz, i did a test whit meteor-client.js old version in iOS device 10.3.1 version y it works fine. The problem seems is meteor-client.js generated whit the latest meteor version

@lingboz
Copy link

lingboz commented Aug 15, 2017

@fernandoarevalo

What do you mean by test whit meteor-client.js old version?

Did you downgrade your metoer-client bundler plugin to previos versions?

@fernandoarevalo
Copy link
Author

@lingboz, I just added generated file by a meteor old version (backup file since february) in node_modules path and tested on the iOS device, I think the problem is when running "meteor client: bundle" that looks for the meteor latest version and not a specific version or the latest meteor-client-bundler module version (current 0.2.1)

@lingboz
Copy link

lingboz commented Aug 15, 2017

Hi @fernandoarevalo
Hi yes, when you call that script it checks Meteor's update and will run the latest version.

But I guess this might not be the answer we are looking for, because we are going to update it in the long run. Further errors may occur

@wilkovanhoek
Copy link

Okay, I downgraded my Meteor version to 1.5, bundled anew and received a working version. Bundled a second time and it downloaded [email protected] and... it crashed. So you are right guys!

I agree, this doesn't seem to be a future save procedure:-/

@lingboz
Copy link

lingboz commented Aug 15, 2017

@wilkovanhoek hmm, good to know that 1.5 is working

@fernandoarevalo
Copy link
Author

fernandoarevalo commented Aug 15, 2017

Hi @wilkovanhoek,

  • What do you mean "downgrade my Meteor version to 1.5", you refer the global meteor version or project meteor version?
  • How do you do to force the generation of the meteor-client file with Meteor 1.5 version and not the latest?

@wilkovanhoek
Copy link

@fernandoarevalo

  • yes, I reinstalled my global Meteor to version 1.5
  • I did not force it. I first thought the bundler would just go with the global Meteor version, which it kind of did the first time I bundled it. When bundling a second time it downloaded the new version anyway. Testing it today showed that the bundler only upgrades if the new version of meteor is know. This means you have to actively call meteor yourself (which I did between the two bundling processes yesterday by starting the meteor server locally). So this is not even a temporary fix.

@sxxymzy
Copy link

sxxymzy commented Aug 18, 2017

Same issue here, I tried downgrade to version 1.5, another issue "TypeError: Cannot read property 'get' of undefined" pop up so I have to upgrade back to 1.5.1.

@lingboz
Copy link

lingboz commented Aug 18, 2017

Anyone double checked webpack and meteor-client-bundler to see if they have problems?

@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.

@pkitatta
Copy link

pkitatta commented Aug 20, 2017

Hi guys, I have an update on the issue. @fernandoarevalo was right to suspect the bundler.

I have realised it's not a meteor version issue for three reasons:

  1. When I was going through my backedup projects I realised that 2 of the working projects I backed up early this month had meteor 1.5.1.

  2. Looking at the meteor-client.js file from early this month and the one generated of late there is a difference in the code.

  3. When I import the old generated file from early this month into the new project, the app runs fine.

I suspect it is a bug in the new generated file. We might need to find the author @DAB0mB for this.

@wilkovanhoek
Copy link

Hi everyone,

I finally managed to find some time for this again. I found a working older version of meter-client.js with Meteor 1.5.1 as well on one of my systems. So the Meteor version is not the root cause. Following the solution from @sxxymzy, the issues seem to be deeper in the dependency trees.

Anyhow, version 1.5 fixes it for me right now. I decided to fork the meteor-client-bundler and add the possibility to specify the meteor version (wilkovanhoek/meteor-client-bundler). This is not a permanent solution but it works for me for now. Also, I think it is a suitable addition to the meteor-client-bundler. I proposed to include the changes in the original project.

@pkitatta
Copy link

Hi @wilkovanhoek, so does it it mean that the bundler will generate a working client file.

Looking at @sxxynxy solution, I found those same lines in the older client file which has no problem, so are they really the problem?

@wilkovanhoek
Copy link

Hi @pkitatta,
it does create a running file for me. I also decided to go back to Meteor 1.5 on the server side, to be sure they are aligned.

I also tried to look into the dependency a bit closer, but could not really find the source.

@pkitatta
Copy link

I have versions 1.5 and and 1.5.1 installed on different projects. Bundling with 1.5 was giving me the new problematic file. So are you saying we should reinstall the meteor-client-bundle globally?
Sorry for my slow understanding.

@wilkovanhoek
Copy link

As far as I could trace it, meteor-client-bundle will bundle with 1.5.1 no matter what your project release file says. It executes a regular "meteor create" command to create a temporary project. This will use the most recent stable meteor release (currently 1.5.1). That is the reason why I added the possibility to specify the meteor release for the meteor-client-bundler.

To use this, you would have to install my version of meteor-client-bundler (for me it only worked globally, maybe I missed something). You can do this by executing:

npm i -g git+https://[email protected]/wilkovanhoek/meteor-client-bundler

after the installation check if it is version 0.2.2 now

meteor-client -V

now try to build the bundle with version 1.5 by adding "release 1.5" to the bundle command like so:

meteor-client bundle --release 1.5

you still can use all other parameters to include a config file or whatever you included/condigured before.

This worked for me even without downgrading the server side Meteor version. If it does not work for you, you can go back to the npm meteor-client-bundler package:

npm i -g meteor-client-bundler

Maybe I should have been clearer on what I did. Anyhow, I hope this makes the process clearer. Please let us know if it works for you too.
Cheers!

@pkitatta
Copy link

pkitatta commented Aug 21, 2017

O.K now I get this error:

image

image

and this is in chrome.

@pkitatta
Copy link

image

So is this how your meteor-client looks now?

@wilkovanhoek
Copy link

My meteor-client looks different. I don't have the 'Disable hot-code-push' lines. It looks like this.

__meteor_runtime_config__ = {
  "meteorEnv": {},
  "DDP_DEFAULT_CONNECTION_URL": "http://localhost:3000"
};

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// This is a generated file. You can view the original                  //
...

I don't know, but maybe there is something wrong with the way that meteor-client is included. See "Package is not defined". Did you use the current master branch of the Tutorial?

@pkitatta
Copy link

Yes, that how the original looks like. But when I use your bundler then I get that client file with only 12 lines.
I have gone back to the original for now(0.2.1). Also "Disable hot-code-push' lines" are there in the original(both the working and non working client files), they are usually the last pieces of code.

@wilkovanhoek
Copy link

Oh, now I understand. that is the whole meteor-client :-( Well, it's a pity it does not work for you. What is the exact bundle command/output that you have used/got?

@pkitatta
Copy link

I followed your instructions above. First the bundler changed to 0.2.2 and then after bundling with the --release 1.5 flag I got a client file with 12 lines as shown. I did this with meteor version 1.5. I reverted back to 0.2.1 and the rest of the code came back.

@wilkovanhoek
Copy link

Hmmm, that's bad. Sorry, but it seems I can't help you there.

@carlos-olivera
Copy link

Same problem here, only did work with se hack of @sxxymzy

@lingboz
Copy link

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

Didn't try Meteor 1.5.2, but I rebased the whole tutorial to 1.6.0beta: https://github.com/darkbasic/Ionic2CLI-Meteor-WhatsApp/
You can have a look if you want, but please don't report bugs for 1.6.0beta because I don't plan to support it until it gets released.

@lingboz
Copy link

lingboz commented Sep 11, 2017

Hi @darkbasic
That is great,
I will definitely try your repo.
I will also try the Meteor 1.5.2.

@darkbasic
Copy link
Collaborator

darkbasic commented Sep 11, 2017

Please note that you will need an unreleased meteor-client-bundler in order to use 1.6beta, because you will have to pass the --release parameter:

meteor-client bundle -s api --release 1.6-beta.26

You can find the patch in a PR.

EDIT: meteor-client-bundler 0.3.0 has just been released, there is no need for patches.

@airstep
Copy link

airstep commented Oct 3, 2017

Any news? Tried with 1.6-rc2 still not load application. And no errors from log in XCode

@airstep
Copy link

airstep commented Oct 3, 2017

Testing with 1.6-beta.26 and it also doesn't work.

Using this: meteor-client bundle -s api --release 1.6-beta.26

I've got error like on screenshot.
screenshot

@lingboz
Copy link

lingboz commented Oct 3, 2017

@airstep We are still investigating. We have found that on android api 25 it is not working, but on later android 7.1.1 it worked.
The discussion is here:
#124 (comment)

@airstep
Copy link

airstep commented Oct 3, 2017

I must say that it is work with Simulate iOS in browser. But still doesn't in simulator\emulator\real device.

@IvanLjubicic
Copy link

Hi guys.

Any news regarding this? I encountered the same problem like @airstep showed on the screenshot.

Thanks.

@darkbasic
Copy link
Collaborator

Let's track it here: #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

10 participants