practicalmeteor / meteor-wkwebview

A meteor package for using the significantly better and faster WKWebView in mobile apps on iOS 8+.
https://atmospherejs.com/practicalmeteor/wkwebview
MIT License
35 stars 4 forks source link

Cannot connect to Meteor server #3

Closed JamesLefrere closed 9 years ago

JamesLefrere commented 9 years ago

Hi, I hope this is the right repo to post this issue in, but it does seem like a Meteor issue.

In my project, with the package and the cordova plugin added, I can try to run the app as follows:

meteor run ios-device --settings=settings.json --mobile-server=http://192.168.178.75:3000

The app does launch, but it can't get past the splash screen. The log reads:

2015-06-08 20:52:22.645 testapp[926:60b] Apache Cordova native platform version 3.7.0 is starting.
2015-06-08 20:52:22.650 testapp[926:60b] Multi-tasking -> Device: YES, App: YES
2015-06-08 20:52:22.808 testapp[926:60b] [CDVTimer][file] 11.548996ms
2015-06-08 20:52:22.912 testapp[926:60b] [CDVTimer][statusbar] 103.003025ms
2015-06-08 20:52:22.929 testapp[926:60b] [CDVTimer][splashscreen] 15.681982ms
2015-06-08 20:52:22.931 testapp[926:60b] Init FacebookConnect Session
2015-06-08 20:52:22.953 testapp[926:60b] [CDVTimer][facebookconnectplugin] 22.512972ms
2015-06-08 20:52:22.956 testapp[926:60b] [CDVTimer][TotalPluginStartup] 159.676015ms
2015-06-08 20:52:23.004 testapp[926:60b] active
2015-06-08 20:52:24.071 testapp[926:60b] Resetting plugins due to page load.
2015-06-08 20:52:24.314 testapp[926:60b] Finished load of: file:///var/mobile/Applications/CD65C777-3F10-43C3-88C6-435EA2BB612C/testapp.app/www/index.html
2015-06-08 20:52:24.714 testapp[926:60b] THREAD WARNING: ['Device'] took '11.073975' ms. Plugin should use a background thread.
2015-06-08 20:52:24.734 testapp[926:60b] METEOR CORDOVA DEBUG (meteor_cordova_loader.js) Error reading version file Error: Failed to resolve entry: file:///var/mobile/Applications/CD65C777-3F10-43C3-88C6-435EA2BB612C/Library/NoCloud/meteor/version
2015-06-08 20:52:24.737 testapp[926:60b] METEOR CORDOVA DEBUG (meteor_cordova_loader.js) Couldn't load from the manifest, falling back to the bundled assets.
2015-06-08 20:52:24.740 testapp[926:60b] WkWebViewCordovaUpdate.startServer: arguments - (
    "/var/mobile/Applications/CD65C777-3F10-43C3-88C6-435EA2BB612C/testapp.app/www/application/",
    "/var/mobile/Applications/CD65C777-3F10-43C3-88C6-435EA2BB612C/testapp.app/www/"
)
2015-06-08 20:52:24.741 testapp[926:60b] WkWebViewCordovaUpdate.startServer: _webServer.serverURL - (null) 
2015-06-08 20:52:24.743 testapp[926:60b] WkWebViewCordovaUpdate.startServer: documentsFolder - /var/mobile/Applications/CD65C777-3F10-43C3-88C6-435EA2BB612C/Documents 
2015-06-08 20:52:24.745 testapp[926:60b] WkWebViewCordovaUpdate.startServer: METEORCordovajsRoot - (null) 
2015-06-08 20:52:24.746 testapp[926:60b] WkWebViewCordovaUpdate.startServer: serverUrl - http://localhost:0
2015-06-08 20:52:24.750 testapp[926:60b] METEOR CORDOVA DEBUG (meteor_cordova_loader.js) Loading from url: http://localhost:0
2015-06-08 20:52:24.768 testapp[926:60b] Resetting plugins due to page load.
2015-06-08 20:52:24.784 testapp[926:60b] Failed to load webpage with error: Could not connect to the server.

Do I need to specify the server in a different way? I checked this without the WKWebView and it does work there.

Cheers James

rbabayoff commented 9 years ago

I think it's my bug. What ios version is the device running?

Wenape commented 9 years ago

I have a similar problem, I can't get past the Splash Screen, there are no error reported though:

2015-06-09 15:37:26.440 TestApp[414:66128] Apache Cordova native platform version 3.7.0 is starting.
2015-06-09 15:37:26.443 TestApp[414:66128] Multi-tasking -> Device: YES, App: YES
2015-06-09 15:37:26.471 TestApp[414:66128] 

Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file

2015-06-09 15:37:26.662 TestApp[414:66128] Using a WKWebView
2015-06-09 15:37:26.850 TestApp[414:66128] [CDVTimer][splashscreen] 90.955019ms
2015-06-09 15:37:26.927 TestApp[414:66128] [CDVTimer][file] 76.059997ms
2015-06-09 15:37:26.936 TestApp[414:66128] [CDVTimer][statusbar] 8.495986ms
2015-06-09 15:37:26.937 TestApp[414:66128] [CDVTimer][keyboard] 0.533998ms
2015-06-09 15:37:26.937 TestApp[414:66128] [CDVTimer][uniquedeviceid] 0.194013ms
2015-06-09 15:37:26.938 TestApp[414:66128] [CDVTimer][TotalPluginStartup] 178.807020ms
[INFO] GCDWebServer started on port 12344 and reachable at http://192.168.0.106:12344/
2015-06-09 15:37:26.952 TestApp[414:66128] Started http daemon: http://192.168.0.106:12344/ 

This just started happening today. The same logs always appear on the Xcode console when the starts, but before, the app would just run normally after this.

Tested on an iPhone 5C, iOS 8.3.

Wenape commented 9 years ago

Solved my issue. It had to do with a plugin that contained an error. @JamesLefrere I'm using meteor build .build --server=blablabla.com. Then opening '.build/ios/project/TestApp.xcodeproj' to run the app. Maybe this fixes your problem.

rbabayoff commented 9 years ago

Can I close this or are people still having problems?

danlg commented 9 years ago

still open for me, see my post at https://github.com/Telerik-Verified-Plugins/WKWebView/issues/24

rbabayoff commented 9 years ago

As soon as meteor 1.2 is out, i'll merge Telerik's repo and hopefully this will be solved. I cannot merge until meteor doesn't support cordova 5.0 which comes out in 1.2.

danlg commented 9 years ago

This is now solved with practicalmeteor:wkwebview. I was using actually Telerik plugin not practical meteor:wkwebview. Just strange thing by default Xcode relative path in WkWebViewCordovaUpdate.h is breaking

import "../com.meteor.cordova-update/CordovaUpdate.h”

had to change to absolute path. I am using meteor1.2-rc-12

On 9 Sep, 2015, at 13:09, Ronen Babayoff notifications@github.com wrote:

As soon as meteor 1.2 is out, i'll merge Telerik's repo and hopefully this will be solved. I cannot merge until meteor doesn't support cordova 5.0 which comes out in 1.2.

— Reply to this email directly or view it on GitHub https://github.com/practicalmeteor/meteor-wkwebview/issues/3#issuecomment-138786231.