My Meteor-based app no longer works as designed on iOS, without me having changed anything relevant. The app still works when run from a local server (http://localhost:3000) as well as when hosted at meteor.com. But, in an iOS simulator and when deployed to an iOS device through xCode, the app fails to run properly.
The app opens with a form that needs to be filled in by the user. When submitting the form, on iOS, the entered values briefly are stored in session variables, but almost immediately the session variables are emptied and the form is displayed again. (What should happen is for an external JSON file to be loaded, based on the form values, after which the contents of that JSON file is manipulated and displayed.)
I just now upgraded to the latest version of Meteor, and xCode did an upgrade itself in the background.
The app is supposed to load a Google font file (from fonts.googleapis.com), but though this works fine when the app is served from either the localhost or meteor, the font does not appear to be loaded when the app runs on iOS.
I'm sorry I don't have actual example code (the whole app?) or a running version of the app that I can show you. As the app is not yet publicly available, I'm a bit reluctant to publish it here. :(
Is there a way to meaningfully debug a Meteor app running on iOS? Is there something obvious I'm missing in the deployment?
Turns out there's an issue with meteor 1.0.4 and building a project using Cordova (https://github.com/meteor/meteor/issues/3814).
I downgraded to meteor 1.0.3 through:
meteor update --release 1.0.3
Then, I deleted the Cordova folder in .meteor/local/ with
rm -R cordova-build
Then, I patched 1.0.3 to 1.0.3.2 with
meteor update --patch
This solved the problem.
Related
I am making a MERN e-commerce project with redux.
I have hosted my backend in Heroku and my frontend is hosted in vercel .
everything running fine from localhost but when I open hosted site
then it shows "o.map is not a function" on console
Here is my project github link-
Frontend- https://github.com/arijitdas13105/Ashop-frontend-new
Backend- https://github.com/arijitdas13105/ashop-backend
My hosted website link - https://ashop-frontend-99x2ayoh7-arijitdas13105.vercel.app/products
My backend Product API - https://ashop-server.herokuapp.com/api/products
let me know anything else need.
When you host in vercel, your JS code is minified with react-scripts build (You can see it in your package.json). This o.map is other variable in your code, probably the products.map. You can solve this issue using products?.map instead, so it will try to render the elements only when it has content.
If the data is not load and you don't know why, I recommend you to run it with npm run dev and figure out the reason (you can use debugger or console.log).
You can see the Network Tab in your devtools to see what the backend is returning as well.
I'm working with the React Create App and implementing PWA features. I configured PWA manifest successfully, the app can be installed. Now I'm working on Offline mode and here is a problem.
For local development, CRA uses webpack dev server. The app runs on http://localhost:3000
When I add the app to my Desktop and turn off the internet and the webpack dev server I'm facing the error: The webpage at http://localhost:3000/index.html might be temporarily down or it may have moved permanently to a new web address.
It looks like it doesn't work without the working server, eg. a connection.
So I can't test the PWA features because it just doesn't work in a Standalone Mode without any connection (internet & webpack dev server) but I have to.
Is it possible to handle it somehow? Or I'm doing something wrong?
Basically my question is: How to the PWA Offline mode locally in a Standalone mode when PWA installed on Homescreen and the Internet and Dev server are turned off.
Thanks for any help!
Kind Regards.
I've done some app for IOS and Android.
IOS is working fine and it's poblished on App store since 3 weeks.
So, the time has come for android. I have to do some css tweaks, beacuse android was looking different in some aspects.
After when i did it, i run tns run android, next emulator appear.
All is working well, so i've run tests on Firebase console.
It was a suprise for me, beacuse i saw this error: (Emulator installed is launching app without issues.)
Nativescript fails to load code that holds common js functions.
Here is part of my app.js
And, right now i'm able to see this error in my emulator.
Steps to reproduce:
- run tns run android (app is working well)
- do some typo in any js file (make any error): livesync will run again, and as result i will see this error.
My question is: do android have problems with requiring this file? IOS is working very well, but i'm unable to deploy android.
Thank you.
Edit: It works on iOS, the problem is therefore limited to Android.
I just found out, that in my Meteor production app, Hot Code Push is broken. I don't know when it started to occur, but here are the facts (in no particular order):
When I upload new binaries to Google Play/iOS App Store a new version is downloaded by all devices
When I update the server only, the Android App does not update, even when manually forcing a window.location.reload() in the app.
After the server update, in the browser the app reloads as it should be (to the new version)
https://myapp.com/__cordova/manifest.json is served as it should be
I am using mup 1.3.5 on the server
In development mode (on localhost) Hot Code Push works perfectly
When using git checkout on an older commit and building the app locally via meteor run android-device --mobile-server https://myapp.com I can see the following console output:
Download failure
com.meteor.webapp.WebAppException: Error downloading asset manifest
at com.meteor.webapp.AssetBundleManager$1.onFailure(AssetBundleManager.java:97)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:140)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.net.ProtocolException: Expected ':status' header not present
at okhttp3.internal.http.Http2xStream.readHttp2HeadersList(Http2xStream.java:266)
at okhttp3.internal.http.Http2xStream.readResponseHeaders(Http2xStream.java:149)
at okhttp3.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:723)
at okhttp3.internal.http.HttpEngine.access$200(HttpEngine.java:81)
at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:708)
at okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:563)
at okhttp3.RealCall.getResponse(RealCall.java:241)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:198)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:160)
at okhttp3.RealCall.access$100(RealCall.java:30)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:127)
... 4 more
Download failure
com.meteor.webapp.WebAppException: Error downloading asset manifest
at com.meteor.webapp.AssetBundleManager$1.onFailure(AssetBundleManager.java:97)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:140)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.net.ProtocolException: Expected ':status' header not present
at okhttp3.internal.http.Http2xStream.readHttp2HeadersList(Http2xStream.java:266)
at okhttp3.internal.http.Http2xStream.readResponseHeaders(Http2xStream.java:149)
at okhttp3.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:723)
at okhttp3.internal.http.HttpEngine.access$200(HttpEngine.java:81)
at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:708)
at okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:563)
at okhttp3.RealCall.getResponse(RealCall.java:241)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:198)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:160)
at okhttp3.RealCall.access$100(RealCall.java:30)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:127)
... 4 more
"Error: Error downloading asset manifest", source: http://localhost:12128/packages/webapp.js?hash=e448c6ebb2384292f7c97e676471a51951a04169 (71)
This suggests that some kind of :status header is missing for the asset manifest. How can I fix this?
I had this exact same problem with the same console error logs. Using Meteor 1.6.1 and mup 1.4.3. In the end I fixed it by upgrading the cordova-plugin-meteor-webapp with:
meteor add cordova:cordova-plugin-meteor-webapp#1.6.0
and then redeploying. Then hot code push worked on Android!
Edit: To give more background - I think the problem is caused by a problem with okhttp and HTTP/2 on certain version of nginx. See this question. The updated cordova-plugin-meteor-webapp plugin uses a newer version of okhttp.
Does anyone use electron + simplewebrtc successfully?
I used simplewebrtc to build a web app. It works fine in browsers.
When I migrated it into electron, something weird happened.
At first I used two copies of my electron app to make them connect each other, but failed.
Then, I made a web browser version and a electron version connect each other.
First, only when the electron version joined the room first, and then made the web version join the room, they can connect each other. otherwise, if the order changes, they cannot get the event peer.pc.iceConnectionState to "connected".
Second, even if them are connected, data channel only works on one way. Only web version can send message to electron version. If I try to let electron version send a message to web version, nothing happened.
During the whole time, no any error was thrown.
Thank you in advance.
simplewebrtc 2.2.3 - 3.0.1
Electron: 1.7.6
Web browsers: Chrome 62, Opera 49, Chromium 58