Blazor PWA hosted in kestrel - no automatic update? - caching

I am having a blazor PWA related problem, in an app that is hosted in kestrel webserver. For testing I have it installed on my android phone. Its working great, online and offline.
The "service-worker.published.js", I am using is exactly the same as in the default PWA template.
I can see that after publishing the app, the hashes of the included files change and also the final "service-worker.js" gets updated.
So everything looks good, but I cant get the app to update on my phone. To get an update I have to uninstall it, then clear the browser cache and repeat the installation.
What am I missing here? Is it some setting in the webserver or is there anything missimg in the default "service-worker.published.js"? It looks like a very basic thing!
Greetings,
Frank

Related

Installed web app shows different version than in browser

When I load matchflix.ch on my phone, the installed app shows a different version than when I open the site in the phone browser. How can this be?
Details
I know that a service worker is in place for offline mode / caching. However, the web app should behave the same in the browser and in the installed web app, since in the service worker I only listen to the fetch event and do nothing on the install event.
Reproduction
You can check the difference by showing infos of a movie and then click on the yellow play icon. In the new version, it should show something below, while in the old version, a new website opens.
After a few hours, somehow, the version in the app is now the same as in the browser (as it should be). Still don't understand it really, but so far, the problem seems to be solved...

"App not found, Please verify..." when launching from Visual Studio, but installs normally from Developer Portal

I'm currently learning Teams development and I just installed the Teams Toolkit extension. Following the quickstart guide, launching the app opens my browser with the Teams web app and the message
App not found, Please verify the app and it's[sic] access
permissions.
Fortunately, this app can still be launched when selecting the "Preview in Teams" option in the Developer Portal.
Quoting the GettingStarted.txt:
If you Start Debugging in a browser and Teams shows the message "App not found, Please verify the app and it's access permissions", it means the app hasn't been uploaded to Teams Dev Portal. To resolve this, follow the steps in the Quick start section above. The Project > TeamsFx > Configure for SSO menu command will do this step for you.
Except it was successfully uploaded to Dev Portal.
What I did
Did this "Configure for SSO" thing. No problems with that and the app was successfully added to the Developer Portal.
Where I searched for an answer
VS Marketplace page for Teams Toolkit (Reviews, Q&A)
Github page (issues) for Teams Toolkit
This very site - Stack Overflow.
Obviously, I'm not 100% sure that I haven't missed anything.
Temporary solution
In the meantime, I set the "launchBrowser" property to "false" in launchSettings.json. However, it's a waste of time to constantly go back to the Developer Portal to launch it, especially when the functionality is there.
Visual Studio 2019, Microsoft Development Account.
Thanks in advance.
We tried to repro this issue at our end and it is working fine for us. Could you please make sure app is opened in same tenant with which you configured for SSO. Also please remove all credentials from cache to make sure its not taking another credentials and try again.
Assuming nothing else was changed from the new project template, there are a few things you can try to narrow down the issue.
Open your browsers web dev tools and watch the console after clicking the Add button (before you see the error message). Sometimes a useful error message from the developer portal helps identify the issue.
Verify that when Visual Studio launches the URL, the correct tenant is loaded in Teams.
Run the project in VS, then manually navigate in your browser to the endpoint of your tab that you expect to work. It would be something like https://localhost:44357/tab by default (the value is in the manifest.json). The sample won't work completely because it's not running inside Teams, but you should be able to verify it's working locally.
If none of that helps, please log an issue on the GitHub page and we can investigate a bug.

Can a Xamarin app be updated by downloading an image, CSS, or .js files using WCF service?

Suppose we write a Xamarin MVC application which is deployed to a device and runs connected to the web.
If we need to update the application by downloading some images, CSS, or .js files using WCF service, for example, is that possible?
Does iOS, Android, and Windows allow you to do that?
Thanks
You can not update the app bundle itself on either iOS or Android, and presumably UWP but I am not very familiar with that platform so not sure. For iOS and Android the app bundles are signed so they can not be modified or else the signature will no longer be valid. You can, however, download anything you want and store the downloaded files in the file system. Every app does have a file system it can access to read and write from. See this Xamarin doc:
Forms:
https://developer.xamarin.com/guides/xamarin-forms/working-with/files/
You might also want to look into the PCLStorage plugin:
Xamarin Component: https://components.xamarin.com/view/pclstorage
NuGet: https://www.nuget.org/packages/PCLStorage/
Source: https://github.com/dsplaisted/PCLStorage
(I know I should paste relevant bits from links, but there is just too much to paste and would end up pasting the whole article. If above link is broken, just google "Xamarin working with files")
Note: I work for MS/Xamarin

What is causing my website converted to APK pages to stick when scrolling?

I converted my website to an APK and it installs fine - the problem is that when trying to scroll up or down - the page sticks and the page refreshes to a page not available - the live site works perfect.
Try to use momentum scrolling. I don't know exactly what can cause your issue, but
Android 3+ and iOS 5+ implemented a new property called overflow-scrolling that enables momentum scrolling. And it works beautifully.
Look here: http://www.mobify.com/blog/beginners-guide-to-perceived-performance/
Hope that helps.
I was using a service from GoNative that packages mobile web sites into APKS - kind of a wrapper to allow mobile sites to function like apps. One of the configuration options was to use "web pool" services that cached pages to allow for faster processing - I deleted that feature and the site/app works fine.

Not able to debug phonegap app running on windows 8 mobile

I have a phonegap application that has some layout problems. I can run the app in browser for the most part, and this usually get me over the line. But with a new design I need to debug the application layout on windows phone 8.
I'm currently looking at weinre but its not showing anything on the desktop when browsing the local server, I have added the link to my application I have cleaned up everything I can think of. Still blank. Any good tuts around the ones I have read just copy and paste the original docs or are not on my same error.
There's a public weinre server available here:
https://the-weinre.herokuapp.com/
You may have better luck with that than with your local server. There's a demo available on that page, give that a try and see if it works on your windows 8 mobile device.

Resources