[PWA][NEXT.JS][iOS] I sometimes cannot get data from server. The error message is FetchEvent.respondWith received an error: no-response: no-response - safari

My PWA app sometimes cannot get data from server. It shows errors like:
FetchEvent.respondWith received an error: no-response: no-response
Fetch API cannot load
no internet connection
[](https://i.stack.imgur.com/ZcBm4.png)
But if we reload the page, it could get data normally. And these bugs only happened in Safari. It is working well in Chrome or window devices.
I reference some page. But I don't know these bugs caused by BE settings (CORS) or Safari.
My devices I am testing is iPhone XS, iOS 14.4
And I am using the newest 'next-pwa' version which means the workbox version is 6.5.4
"workbox-webpack-plugin": "^6.5.4",
"workbox-window": "^6.5.4"
Referenced Pages:
https://github.com/GoogleChrome/workbox/issues/1730
https://www.adro.codes/vault/pwa-fetch-respondwith-error-safari
Service Worker FechtEvent.respondWith response is null on iOS 12.1 Safari

Related

How do I disable the Safari cross origin request for Ipad/Iphone on browser stack?

I am running my UI automation tests on browser stack and they all are failing just for Ipad/Iphone safari browser running on ios 11.
Our application is making cross domain requests and this could be one of the reasons why ios restricts it. Hence is there any way in browser stack I can disable this policy via capabilities or setting some preferneces?
The issue you are referring to is already raised with Appium and is specific to Safari iOS and Appium. Here are the issues for your reference:
https://github.com/appium/appium/issues/5832
https://github.com/appium/appium/issues/9464
https://github.com/appium/appium/issues/10184

TokBox Publisher failed to publish in a reasonable amount of time

I am implementing a video recording for my web application using OpenTok's js library.
Currently using .NET and JavaScript SDK to record the video.
https://tokbox.com/developer/sdks/dot-net/
The video recording is working on Chrome and Firefox, but it is not working on Mobile Safari 12.3.1, resulting in so many errors.
It works sometimes, but most of the time, it results in an error.

Is there a bug with Worklight on IE 10?

I've been working with a business partner to get an insurance app working on a Windows 8 tablet and have come across some interesting behavior that I can't explain.
I have managed to recreate the problem using a very simple use case and it appears to fail in the browser as well as when deployed as an app.
To re-create
Create a simple WL Hello World app with no JavaScript libraries
Deploy it to the development server
Open up an IE 10 browser and launch the WL Console.
Run this app using "Preview as Common Resources" and it should work fine (showing the default Hello Worklight)
click F12 to launch the IE debugger and then refresh the browser, click on the show console button to verify there were no errors
Add a WL.Client.connect(...) call into the wlCommonInit method
...
WL.Client.connect({
onSuccess: function(data) {
console.log("connection Successful");
},
onFailure: function(err) {
console.log("Connection FAILED: " + JSON.stringify(err) );
}
});
Save and re-run the app and it fails with an InvalidStateError (verify with F12 debugger)
Open up either a Chrome or Firefox browser to the WL Console page and click the "Preview as Common Resources" and open the developer tools for either and the console shows the connect call succeeding.
Is this a known problem or is there something that I've missed?
The ultimate goal is to deliver a Windows 8.1 tablet app however every time we tried to run the app it failed with this error. After some debugging I thought maybe it has something to do with the OS and tried to replicate it in just the browser with minimum code.
Through testing I've found that the basic Hello Worklight app with a WL.Client.connect() fails on IE but works on other browsers.
So I'm thinking if I get it working in IE browser, then that fix will be good for the tablet app as well.
Any pointers or guidance would be appreciated.
Note I am using WL v6.2 (6.2.0.00-20140915-1601)
Tested on Windows 7 - IE 10.0.9200.17089
Tested on Windows 8.1 - IE 11.0.9600.16663
The error I get is
HTML1300: Navigation occurred.
File: index.html
wlclient init started
before: initOptions.onSuccess
Request [/Connect/apps/services/api/Connect/common/init]
console.trace()
at __log (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:4882:31)
at Anonymous function (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:5240:7)
at createRequestHeaders (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:3200:17)
at sendRequest (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:3266:18)
at initialize (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:3172:17)
at klass (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:524:4)
at sendInitRequest (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:7870:5)
at connect (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:7879:3)
SCRIPT5022: InvalidStateError
File: worklight.js, Line: 1055, Column: 3
Uncaught Exception: InvalidStateError at (compiled_code):1055
For future readers, this problem was resolved by moving to a newer fixpack release v6.2.0.00-20141002

Worklight 6.1.0.1 Fix Pack Contents Definitive List

When looking at the contents of Version 6.1.0 Fix Pack 1, it doesn't appear to list PI06519 as one of it's constituents, yet when applying the fix pack in a bid to address the slow start up issue, it appears to fix the problem.
Is this supposed to be the definitive list of the contents of the fix pack and is simply an oversight, or should I be looking somewhere else for the full contents of it?
There is some problem with listing this APAR in the list of fixes which has yet to be resolved.
Here is a copy of the fixed APARs in Worklight 6.1.0.1:
Changes since: 6.1.0.0
Fixes (APARs):
PI12596 A HYBRID APPLICATION MAY FORCE CLOSE OR FAIL TO CAPTURE DATA WHEN RETURNING FROM THE CAMERA VIEW.
PI12471 RICH PAGE EDITOR'S PERFORMANCE SUFFERS WHILE TYPING.
PI12337 WHITE LINE AT THE BOTTOM IN IOS 7.1
PI11962 SECURITY ISSUE WITH WORKLIGHT CONSOLE
PI11561 STUCK IN A DIALOG ENDLESS LOOP IN ECLIPSE WORKLIGHT PREFERENCES
PI11502 EVENT LISTENERS ATTACHED WHEN CONNECT() IS INVOKED BUT NEVER UNBOUND.
PI11350 IN THE WL STUDIO WITH BUILT-IN SERVER, THE FEATURE OPEN WORKLIGHT CONSOLE DOES NOT START THE SERVER AUTOMATICALLY.
PI11168 WORKIGHT PAGE DOES NOT RESPOND TO CHANGING RICH PAGE EDITOR DEVICE ORIENTATION TO PORTRAIT
PI10959 JSONSTORE FAILS TO REMOVE ALL DOCS IN THE DOC ARRAY WHEN A DOC ARRAY IS PASSED
PI10818 FAILURE WHEN DEPLOYING WORKLIGHT APPLICATION ON WORKLIGHT PUREAPPLICATION PATTERN WHEN SCALING POLICY IS IN EFFECT
PI10775 SERVER CONFIGURATION TOOL DEPLOYMENT CAN NOT PROCEED WHEN USING DB2 DATABASE IF DB2 INSTANCE OWNER ID DOES NOT HAVE SSH ACCESS
PI10398 PROBLEM CUSTOMIZING TIMEOUTS WITH WL.CLIENT.CONNECT API.
PI10149 MOBILE BROWSER SIMULATOR IS BLOCKED IN BROWSER WHEN USING ORACLE JAVA 7 UPDATE 51 WITH "HIGH" SECURITY SETTING
PI10127 NATIVEPAGE FEATURE DOES NOT WORK PROPERLY ON WINDOWS PHONE 8
PI09913 WORKLIGHT UNDER HIGH VOLUMES SHOWS MEMORY INCREASE WHEN REPORTING ENABLED
PI09863 IF REMOVING THE OPTIONAL FIELD "BADGE", AN ERROR IS RECEIVED: "MANDATORY FIELD 'BADGE' NOT FOUND."
PI09770 IOS PUSH NOTIFICATION ERROR AFTER UPGRADING OR APPLYING FIX
PI09711 [WINDOWS 8] - CANNOT OPEN A WL.SIMPLEDIALOG AFTER IT WAS OPENED AND CLOSED
PI09666 ADDING ENVIRONMENT WAITS ON "BUILD PREVIEW PAGES"
PI09569 WHEN BACKEND IS STALE/SLOW UNDER LOAD THEN GOES BACK TO NORMAL SERVER CANNOT RECOVER UNTIL RESTART
PI09530 ADAPTER INVOCATION IS FAILING IN IOS 5 IN WORKLIGHT 6.1 ENVIRONMENT.
PI09432 CALLING ACQUIREPOSITION AFTER STARTACQUISITION HAS BEEN CALLED WITH A GEO POLICY, MAY NOT ACTIVATE TRIGGERS FOR NEW POSITIONS.
PI09373 RARELY, ON NATIVE ANDROID, MULTIPLE SUCCESS CALLBACK EXECUTIONS CAN TAKE PLACE FOR WLDEVICE.ACQUIREGEOPOSITION.
PI09372 IN NATIVE ANDROID, USE OF THE WLGEOACQUISITIONPOLICY MUST BE DONE IN A LOOPER THREAD.
PI09370 WHEN USING GEO DWELL TRIGGERS, WLGEOFAILURECALLBACK INSTANCES MAY BE EXECUTED AFTER WLDEVICE.STOPACQUISITION() IS CALLED.
PI09356 ADAPT APPLICATION CENTER PUBLISH SHORTCUT TO HANDLE XAP FILES
PI09349 WHEN IMPORTING THE IBMAPPCENTER HYBRID PROJECT, AN INCORRECT WARNING SUGGESTS TO INCREASE THE VERSION
PI09326 APPCENTER OTA INSTALLER: TITLE TRUNCATION ON DETAILS VIEW
PI09325 APPCENTER CLIENT TABLET PORTRAIT, BUTTON TRUNCATION ON DETAILS VIEW
PI09324 APPCENTER CLIENT IOS: DATES APPEAR A PHONE NUMBERS
PI09323 APPCENTER OTA CAN START IN TABLET MODE ON A PHONE IN LANDSCAPE ORIENTATION.
PI09321 WORKLIGHT APPCENTER MOBILE CLIENT: AFTER SENDING A REVIEW, THE APP IS MISSING FROM LISTS IF ITS POSITION CHANGED
PI09315 APPLICATION CENTER MOBILE CLIENT ON TABLET: SOME APPLICATIONS MAY NOT BE DISPLAYED IN CATALOG.
PI09233 WORKLIGHT SERVER THROWS EXCEPTION WHEN RE-AUTHENTICATING WITH THE ANTIXSRF REALM
PI09224 WHEN MIGRATING A PROJECT FROM WORKLIGHT 6.0 TO 6.1, AN ERROR OCCURS STATING THAT THE UPGRADE PATH IS NOT SUPPORTED
PI09029 IOS APP LINK FAILS WHEN SETTING IOS DEPLOYMENT TARGET TO 7.0
PI08960 WL RUNTIME LOGS THE FULL CLIENT REQUEST WHEN AN ERROR HAPPENS
PI08819 INCORRECT DATA MAY RETURNED WHEN SUBSCRIBING/UNSUBSCRIBING FOR SMS EVENTS
PI08807 DESIGN PANE FOR JSF PAGES FAILS TO UPDATE
PI08806 INACCURATE JSP VALIDATION
PI08789 FIX WLJQ.JS TO SUPPORT WINDOWS 8 AND WINDOWS PHONE 8
PI08777 "ITMS-SERVICES" PROTOCOL DOES NOT WORK
PI08689 INCORRECT DATA MAY BE RETURNED FROM THE SERVER TO THE APPLICATION
PI08685 IMPROVE PERFORMANCE WHEN USING THE IBM SDK FOR JAVA
PI08632 APP CLIENT CLOSES WHEN CONNECTING TO SERVER WITH ANALYTICS ENABLED.
PI08609 CLUSTER SYNC TASK REPEATEDLY TRIES TO DEPLOY OLD APP FROM THE DB TO A NEW PROJECT
PI08601 WL.SERVER.INVOKEHTTP WITH DELETE METHOD DOESN'T ACCEPT QUERY PARAM
PI08583 BLACK LINE APPEARS AT TOP OF SPLASH SCREEN ON IPAD RUNNING IOS7
PI08580 ECLIPSE CRASHES WHEN OPENING WORKLIGHT APPLICATION FRAMEWORK VIEW.HTML ON WINDOWS
PI08574 FAILURE TO MIGRATE WORKLIGHT PRE-5.0.5.0 APPLICATIONS TO WORKLIGHT 6.1.0.0
PI08511 OLD LTPA TOKEN IS BEING USED WHEN USER LOGIN AGAIN WITHIN A MINUTE OF LOGOUT
PI08189 ERROR WHEN CONNECTING TO SERVER AFTER SETTING APP TO ACTIVE IN THE CONSOLE.
PI08127 SLOW SERVER PERFORMANCE AND REPEATED DATABASE QUERIES WHEN REMOTE DISABLE IS ENABLED
PI07660 MISSING API GETDEFAULTMOBILECONFIGURATION4ANDROID_IOS() IN LOGINCONFIGURATIONSERVICE INTERFACE
PI07549 SHELL COMPONENT CHANGES ARE NOT SHOWN PROPERLY IN BROWSER DURING PREVIEW
PI07263 SCREEN TURNS BLACK ON IPAD DURING DIRECT UPDATE
PI07256 INAPPBROWSER NOT ABLE TO OPEN LOCAL URL LINKS ON ANDROID 4.4
PI06943 DIRECT UPDATE NOTIFICATION WHEN NONE AVAILABLE, THEN FAILS UPON UPDATE ATTEMPT
PI06828 ANT DEPLOMENT TASKS DON'T WORK WHEN CONSOLE IS PROTECTED WITH LTPA AUTHENTICATION
PI06652 DIRECT UPDATE ALLOWS USERS TO KEEP USING OUTDATED VERSIONS.
PI06586 INCORRECT PUSH NOTIFICATION RECEIVED WHEN MULTIPLE WL APPS ON AN ANDROID DEVICE
PI06568 DIFFERENT VERSIONS OF A WORKLIGHT APPLICATION ENVIRONMENT GET WR ONG SECURITY TEST IF SECURITY TEST IS CHANGED BETWEEN VERSIONS.
PI05454 WORKLIGHT APPLICATION CENTER ON LIBERTY PROFILE 8.5.5 PRODUCES "LAST-MODIFIED" DATES IN BAD FORMAT.
PI05447 NULLPOINTEREXCEPTION OCCURS WHEN CALLING WL.SERVER.LOGACTIVITY.
Status: Fix Pack
Additional Information: Please see http://www-01.ibm.com/support/docview.wss?uid=swg27028172 for information on installing the fix.

Cannot view video from publisher using Chrome to iPad with OpenTok

I'm currently trying to set up a connection between my web client and my iOS app, but for some reason my iOS client only sees a black box when using Chrome (version 33). I can see the video just fine if I use Firefox (both in my app and when I put the browsers side-by-side, they can see each other).
This doesn't appear to be a documented known issue with the JavaScript SDK, and I can't see any recent discussion about this on the forums (last post was mine).
The iOS sample can be located here (samples/OpenTokHelloWorld) with the browser page in samples/OpenTokHelloWorld/browser_demo.html
I suggest cd'ing into samples/OpenTokHelloWorld and running python -m SimpleHTTPServer, as it can't be run from a file:/// path.
Here is what my iPad sees:
Chrome:
Firefox:
And Chrome/Firefox (respectively), both publishing video from the same camera
Edit: after testing on other machines, it may be something specific to my environment even though none of my extensions run in Incognito and I don't have any custom plugins installed.
It looks like the OpenTok mobile SDKs with the specific webcam I was using has issues. On Android the video stream will display for a brief moment then segfault, and on iOS there will be no video at all.
I have tested this many times and could not reproduce what you are seeing in your chrome.
Without seeing any console errors or iOS logs the best suggestion is to try clearing your cache, or maybe restarting your computer (longshot)