Chrome v31.0.1650.57 broke my packaged app webviews - google-chrome

I have a packaged app that requires me to be able to view saved, offlined web pages. These pages are downloaded from my server when the user is online and saved to the HTML5 filesystem so that they can be viewed offline. These are pages that cannot be packaged with the app. I have been using a webview to display this content in my app and this worked fine until the Chrome browser updated to v31.0.1650.57 (Nov. 9, 2013 build). Now I am getting 'ERR_FILE_NOT_FOUND' even though the content is definitely at the provided filesystem URL. The webviews still work fine on my two Chromebooks - an Acer running v29 and an HP running v30 - unless I go into developer mode and run in beta (which is v31.0.1650.57) instead of stable.
My question is what changed and how I fix it? Has Chrome tightened up the security to the point where I'll no longer be able to view these offlined web pages? Have new permissions been added that I need to include in my manifest to get my webviews to work again? I already have permissions for 'webview', 'unlimitedStorage', and the appropriate URL permissions for downloading the pages from my server.
My application is supposed to be given to the client around the first of December so this is a major surprise. Thankfully it didn't happen after the app went live.
Thanks in advance for your help.
*Update - I should point out that viewing an external URL such as 'http://stackoverflow.com' works fine. It is the filesystem URLs (filesystem:chrome-extension://[appId]/[pathToFile]) that are no longer working.
**Update 2 - Google has updated their 'webview' docs (https://developer.chrome.com/apps/tags/webview) but I still haven't been able to load filesystem URLs.

Perhaps this addresses your question? https://plus.sandbox.google.com/100132233764003563318/posts/hsNTHvbvEdo

Related

Facebook mbasic site, mobile safari, home screen shortcuts and local storage

I have a question about the mbasic.facebook.com page and how they manage to do what they do on iPhone with iOS 12.3.1. This is not about the facebook app. I don't have it installed at all.
I went to mbasic.facebook.com in mobile safari on iOS and created a shortcut for it on my homescreen. When I use the shortcut, the page behaves like what Apple calls a web application, i.e. it does not have the usual mobile safari UI.
Here's the weird part:
After using the shortcut and logging in, I switch to the settings app and under "Safari", I delete the browser history and website data.
I then use the shortcut again to launch the mbasic facebook site.
I am greeted with a screen where I still appear to be logged in. If i interact with the page it will make me login again, however.
This makes me wonder about two things:
How does the web application maintain its state (i.e. still know who am i) despite me trying to delete the Safari data?
How do I delete the data in a way that also affects a "web app" launched via a home screen shortcut?
I am not sure exactly. But I think it was done by PWA(Progressive Web App) technology. It helps you to use a website as an app that are installed from app store. And it also has the ability of state maintaining, giving push notification, maintain own storage in your device. When you installed it, all your login information was saved in your device as its own storage and this storage has no relation with your web browser. That;s why when you delete data from Safari, it made no effects on the installed one. And when you installed it, it installed its own manifest file in your device. That's why it runs on your device with it's own UI not with the safari UI. You can delete its data by deleting its storage folder that is created at the time of installation. I am not sure where you got the file in your device. Make a research on it. Here are some useful link about PWA. MDN web docs - PWA 4 important points to know about Progressive Web Apps (PWA) PWA Tutorial Hope it will help you. You are requested to share any new thing that should be known as I am new in this technology.

Trusted web activity - Digital assets link validation for intranet/private web app seem to be failing

I've followed this doc to
Create a wrapper Android app based on this sample project for my UI application which runs in non-public domain in our corporate servers.
Add assetlinks.json in my Angular 6 PWA application, with SHA256 fingerprints of my release key.
Deployed the signed apk to a Android 4.4.3 device running Chrome Dev 69 and Google play services - 12.8.74.
When I run the application, everything works fine except hiding the address bar, which makes it as a regular custom tab and not the "Trusted web" content.
I don't see any error in the log and not sure how to debug this scenario. Any help on this is appreciated.
Got confirmation from Chrome team that they are using TWA assets link validation in server side using an API call and so this solution wont work for Private web apps. Said that, they are also considering to move that logic to browser to support this use case. Will update here when I have any update on this.
Update: As of Chrome Version 72, TWA(Trusted web activity) if available in Chrome stable version and the web asset validation(to make sure the web page is yours/same as the app its loaded to) happens in browser. So this solution can be implemented for private web apps for hosting inside enterprise environment.
Also, now PWAs can be packed as regular app using TWA solution and uploaded to Play store as an apk file. Documentation on this is still being updated as per one of Chrome developer. But the solution as such is ready for use.

Full Website Within Chrome Application Window

Was wondering if I had a web-application on www.mydomain.com/userportal etc but didn't want this accessable via the browser, but as a chrome application similar to how Google's Hangouts is a seperate window / popup - How easy is it to implement an already built application into one of these windows?
If I understand you correctly, you would like to display your www site as a Chrome App. Chrome apps are all HTML/CSS/JS files hosted on the computer but they can display a webview into a site online. However, Chrome Apps must be 'offline' first. So you must ask for permissions to all online activity.
Ideally you would make separate app hosted as a Chrome App (not link/embedded to a www site) that uses an API to talk to a web-app.
Keep in mind that Google is phasing out Chrome Apps for all platforms except Chrome OS in the near future.

Problems with HTML application cache in offline mode when the refresh button is clicked

I have a web app developed with application cache. I am testing it on Windows Phone 8.1 running IE 11 mobile. When the internet connection is turned off the web app loads as expected. My problem is that if I hit the refresh button on the browser when the web app is in offline mode the browser tries to check for an updated manifest file. Since there is no connection it cannot find it and then the cache is rendered in an obsolete state and the browser invalidates the cache. The browser refreshes the web app and then tries to pull the page from the network which fails since I am offline. To summarize, what can I do to prevent the browser from invalidating the application cache on refresh when running in offline mode?
That sounds like a bug to me. Per spec, the applicationCache should only be invalidated (become obsolete) if the request to the *.appcache file returns a 404 or a 410 status. If you are offline, it should instead fail with a status of 0.
I'd suggest to test it with other browsers devices and eventually report it as bug to the IE11 team
Not an answer but my reputation isn't high enough to comment, sorry.
Other people have noticed this too (Why offline web application doesn't work?), so as mentioned already here, it looks like a bug.
Are you testing in the 8.1 release that is available from the Developer Preview app? Or a phone running an official release of 8.1?
I ran into the same problem. I haven't got a solution yet. But i want to list what did NOT work!
Adding IIS Mime Types, as discussed here
Changing .manifest to .appcache, as discussed here
Adding the meta header "cache-control: public" as described here
Also did not work to add the header manually in the webbrowser control of the wp 8.1 cordova web app (in the navigate method).
Deleting the Browser History and local storage in windows phone setting is making the problem even worser
Strangely using developer options in IE and change under the tab emulation to windows phone, the appcache loads succesfull
I hope this list will help other people not to find other solutions.

(Mobile) Safari loading resources despite cache manifest

I've been developing a web app that uses the offline cache, partly as a way to reduce the number of calls made to the server while in use.
I was hoping to have the login page load and cache all the resources such that all pages behind the login would not have to.
What I'm noticing from the server logs is that although all the resources (images, stylesheets, javascript files) in the manifest are requested when the login page loads, after the user has logged in, and redirected to, say, /workspace/, Safari (both desktop and mobile) seems to request the the stylesheets and javascript files listed in /workspace/ again, resulting in a HTTP 304 from the server.
While the load in serving a 304 is minimal, I'd like like to know if there was a way to avoid those. I tested the same code in Chrome (dev channel), and Chrome only requests the cache manifest again after login, and that's it.
Would appreciate any thoughts! Thanks in advance!
I have noticed in my offline app that the host page (the one with the manifest tag in it) must be in the manifest file as well (only in iPhone iOS since 4.3), this to support startup in airline / offline mode.
Perhaps this has something to do with your problem as well.
I had a problem with the offline mode in iOS 4.3
(read this for more insight in the 4.3 issue http://www.theregister.co.uk/2011/03/15/apple_ios_throttles_web_apps_on_home_screen/) however when I updated to 4.3.2 it worked again.
I have found an interesting situation with iOS 4.3.3. I have an HTML5 offline app that worked in iOS 4.2 on iPad. But I updated my iPad to iOS 4.3.1, it can no longer run in offline mode from the Home Screen. However, when I saw that "user593037" say that it was working on iOS 4.3.2, I updated my iPad again and today, its at iOS 4.3.3.
Initially my offline app still did not work offline. So I went back to the MOST basic offline web page and I used "cache.manifest" as the manifest file name it worked. So, it seems that on iOS 4.3.3 the offline caching will only work if that is the file name used for the cache manifest. I even tried with a file name of cache2.manifest and it will fail to run offline.
And you can also run it full screen with the "apple-mobile-web-app-capable" set to "yes".