Chrome Offlining with workbox deletes cache on system restart - javascript

I have tried to create a webpage that I want to cache (contains heavy assets like lengthy videos and images). I followed the workbox guides to the point and the offlined app works as intended. However on system restart, when I open the app, the cache no longer exists and the app makes network calls to get the data. I would understand if the app reset its cache via a code, however, the moment I open the app, the cache simply isn't there.
My guess is that there is a flag/setting on the Cache API that I am missing or some system-level setting on my chrome that is triggering this behavior.
Any help on this is greatly appreciated.
Chrome Version: Version 79.0.3945.88 (Official Build) (64-bit)
OS:
NAME="Linux Mint"
VERSION="19.2 (Tina)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 19.2"
VERSION_ID="19.2"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.ubuntu.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=tina
UBUNTU_CODENAME=bionic
Note: Tried this on Windows, same behavior occurs

Related

Chrome DevTools for Node.js not loading source maps

I am working on a node.js API. We use typescript and I use Chrome dev tools for debuging. In the last day when I started the chrome node inspector it could not load my resource maps. I tried making a small mock project and it happened for that one too.
The warning it gives is DevTools failed to load source map: Could not load content for file://<path_to_source_map>: No setting registered: network.enable-unc-loading. I have the latest version of chrome 105 and I am on macOS 12.5.1.
I was thinking it might have something with mac permission but when I take the link to the file file://<path_to_source_map> and open it in browser it can open my file and I can add the file trough workspaces but it cannot link them even if I do it manually. I do not know if it is a chrome setting or what.
Any ideas ?
I've found this setting:
But this setting is not available in the Dev Tools console for Remote Targets so it didn't fix the issue.

Profiler in react-native broken (V8 and systrace)

I would like to see, which function is keeping my JS thread the most busy. But in any profiling option I just cant see any JS related stuff.
1) Profiling
The most useful would be the V8 profiler, which is accessible in debug mode (in Chrome DevTools or React Native Debugger). Somebody here suggests to look for debuggerWorker.js, but in my Profiling session this thread is missing.
2) Systrace
I found the JS thread (mqt_js), but it is collapsed and cant be drilled into. Any ideas?
I run systrace.py --time=20 -o trace.html sched gfx view -a com.my.rnapp
3) RN "Enable Sampling Profiler"
I even tried the (undocumented) "Enable Sampling Profiler" option in RN debug menu, it seems working, and shows a message with trace location, but file is unfortunately empty everytime. (eg. /data/user/0/com.my.rnapp/cache/sampling-profiler-trace119834863.cpuprofile). Checked using adb shell and ls -la.
Other info:
tested both dev/prod versions, local metro bundler/bundled app
React Native 0.61.1
Emulator with Android API 25 (physical device as well)
macOS 10.14
ad (1) ok - it seems you have to hit "Run profiling", and then reload the APP (rr). Only then RNDebuggerWorker.js appears. Wicked. 😎

Cordova hybrid app- HTTP requests are very slow

I am building a hybrid app, with AngularJS, Cordova, Restangular ond client side and Python with wsgiref.simple_server on server side. I am not doing anything special, this is very simply requests like this:
Restangular.one('/devices').get().then(function (response) {
viewModel.devices = Restangular.stripRestangular(response.devices);
});
I set baseUrl for Restangular:
.config(function(RestangularProvider){
RestangularProvider.setBaseUrl('http://192.168.54.102:8000/');
})
And when I use it on local computer with Chrome browser, everything is fast, works normal. But when I use it on Android on Phonegap developer app on device or install app on device with Android, it works crazy slow. It looks like it is send to server with big delay, cause it takes some time as I see debug server log on server side. It occurs also when python application with server is not in debug mode, for example when I start it normally after install on local computer. As I see some people has this problem, does anybody found a solution or a reason, which causes very slow HTTP requests in hybrid application? Thank you in advance for every answer.
Since you are a hybrid developer, I am sure you are familiar with the Chrome DevTools. For me on a Mac, hit cmd + option + i, or go to View -> Developer -> Developer Tools.
The really great thing about Chrome in recent history is it now works with Android WebViews too. Hybrid developers haven't always had this convenience, and had to debug essentially handcuffed using tools like Weinre.
Now we can use the DevTools directly in the Chrome browser while your Android device is connected by ADB from a new tab calling chrome://inspect
Here is some more detailed information on how to do this if you get stuck.
From here open up the network panel and see how long your requests are taking. If they are showing a significantly longer amount of time to load here, the issue has nothing to with Angular, Cordova, Restangular or probably even Hybrid architecture at all. I would check your network and performance elsewhere on the device.
If this is definitely not the issue, I would use the Timeline tab in the DevTools to see what is taking so long between your browser receiving the information and your device displaying it. If there is any significantly longer process taking place in between, you will see it here.

IoT/WinJS/VS - Failed to create the web diagnostics object

I have successfully installed Windows 10 Insider Preview and Visual Studio 2015 RC on my PC, and Windows IOT Core on my Pi.
I have created a new JavaScript Windows Universal App solution in Visual Studio, and tried to deploy as-is, i.e. the project as supplied in the template. When trying to run the program on the remote machine, in either debug or release modes, the project deploys and runs successfully, however Visual Studio advises with a modal dialog box during the deployment process:
"Failed to create the web diagnostics object. The JavaScript Console and DOM Explorer may not work. Repairing the remote debugger installation may help".
Firstly, can I expect these tools to work on the Pi for a JavaScript Windows Universal App?
Secondly, I don't know how to repair or even access the remote debugger software. It seems to run automatically (msvsmon.exe, twice). Is here something to configure properly to get it to run?
Regards,
Paul
It indicates that you don't have admin access to remote machine, which is natural assuming that you didn't have activated developer mode in BOTH machines.
otherwise, I could say that this could be a bug(but only if you can see the DOM in explorer) you can't disable DOM explorer in V.S either so if this didn't fix the issue and it's annoying, then you will have to wait for update 1 unfortunately.
The only workaround I found was to install Windows 10 on my Dev computer. It appears like this does indeed not work with Windows 8.

Sencha Touch: Cmd-built app not working on mobile browser

I am working with ST2.3.1 and Cmd 4. My app builds and runs fine on my desktop browser but does not launch on a browser on my mobile device. The loading dots with blue background shows up and then just hangs.
I tried this with a testing build on an iPhone 4S with Safari and Chrome, with similar results. So I pulled up the app in Safari, and opened Safari Web Inspector to see what's going on, and I cannot see anything unusual in the index.html. I have taken a screenshot and attached it below. The fact that the loading dots show up and the index.html loads means that I dont have a problem accessing the webserver.
Any ideas why the app may not be launching? Should I expect a testing build from cmd to work just the same way on a mobile browser as on a desktop, or does that require additional setup/configuration? My build settings are otherwise unchanged and use default settings mostly. Could this be a Mac OS X firewall problem? It's running on default factory settings.
Thanks in advance!

Categories

Resources