I needed to debug a PWA that throws an error only when running in standalone mode, this PWA worked fine on the same device but when opened from Google Chrome directly.
I was debugging this web app by connecting from the desktop's Chrome developer tools with USB debugging enabled, but this was quite slow, as I had to build the PWA and publish it to be able to check the changes that I've made because this error was not thrown in development mode (The app is built using Nuxt.js).
That error was related to a code that checks if the web app is running in standalone mode:
window.matchMedia('(display-mode: standalone)').matches
I have resolved the issue but is there a way to simulate this display-mode: standalone from Google Chrome on the desktop?
Related
When I need to make an Android App available in development, I use Play Console to do it, because this tool gives us an option to up the App in DEV to testing, before launching it in Production, that allows any user with link make a download of app by PlayStore to test it.
Is it possible, or exists any tool of Google that allow the same steps above, to deploy a Chrome Extension to testing, before launching it in Production, that can be accessed by any user with link to download and install it on Chrome browser?
P.S. I don't see the option in Chrome Web Store to up an extension to testing like in play console with apps.
I'm new to Cypress and recently started implementing e2e tests for our system. A peculiarity of this system is that the authentication happens on a popup window.
I've already successfully created a simple test that loads the site, waits for the authentication to complete and then asserts that the page title is shown. This test runs without errors using the cypress client (cypress open), but when I run it in headless mode (cypress run --headless) the test fails.
When I see the video from the headless run, I don't see the popup window appear like it does when I run it with the GUI. Has anyone else had an issue like this where popup windows don't show on headless mode?
I also found this bug on the Chromium site related to issues displaying popup windows in headless mode, so it might be related to that, but the bug appears as closed.
I'm using Cypress 6.1.0 and Chrome 87
Thanks in advance for any help.
This was being caused by an issue with the integration of my website with another service that for some reason only occurred on headless mode. After fixing that, it works ok.
Google is deprecating Chrome apps in favor of Progressive Web Apps (PWA) or Chrome extensions. This leaves extensions as the only way to access Chrome device APIs. I'm looking for a way for my PWA to run along with a Chrome extension in kiosk mode but I'm not sure if it's possible.
The reason I need my PWA to access Chrome device APIs is to get a unique identifier per device to decide which content to display.
As per chromeos.dev: "Previously, Chrome Apps had extra functionality available to them in kiosk mode that is not currently supported by web apps alone. You can continue to use some of this functionality by deploying an extension with your kiosk web application."
Source: https://chromeos.dev/en/education/connecting-an-extension-from-a-kiosk-pwa
It only talks about sending a message from PWA to extension in order to execute a chrome API (like restart) but doesn't talk about how to send information back from extension to PWA. We are also stuck in the same boat- looking for a unique identifier so as to throw content on the chromebox running the PWA. Currently we use chrome.enterprise.deviceAttributes to get serial number and directory device ID in kiosk mode and would need the same once we migrate to PWA. Any luck on this?
I'm trying to determine if I can access any browser api for chrome OS that will allow me to identify the device that its running on when the application has been force-installed in kiosk mode as a PWA.
We're running into exactly the same issue right now. The correct path seems to be to create a PWA and to connect it to a (pre-installed) extension that has access to the enterprise.deviceAttributes:
See https://developers.chrome.com/apps/migration:
"If there is a capability that your Chrome App has that the regular web platform can't provide, it might be available as an extension API. In this case, you use a progressive web app together with an externally connectable extension your web app can send messages to."
enterprise.deviceAttributes are only accessible if the calling App/Site is pre-installed to the device and not loaded dynamically, so it cannot run in the PWA by design.
But with this tutorial, it seems possible:
https://developer.chrome.com/extensions/messaging#external-webpage
We're looking into that right now and will post our progess here.
tl;dr I want to use an API that only works for Chrome Kiosk Apps. How can I run my app locally as a kiosk app such that I can access these APIs?
Hey All,
I am trying to develop an application that uses the chrome.audio API. Though the docs do not say so, upon loading an unpacked app on my Chromebox I get a warning saying "'audio' is only allowed to run in kiosk apps sessions, but this is a regular user session."
So I began trying to get the app launched in kiosk mode. I have modified the manifest.json file to claim kiosk mode: "kiosk_enabled":true. I navigate to chrome://extensions and click "Manage Kiosk Applications" but when I put in the app ID provided when loading my unpacked extension, I always get a message saying "Invalid App ID".
It has been suggested to me that the only way to load a kiosk app is either through the admin console (not applicable to me since my device is unmanaged) or by publishing the app to the Chrome Web Store, which is crazy overkill since I have not even developed my app yet, I just want to see if this API can provide functionality I need.
In summary, my question is this:
How can I run my app locally as a kiosk app such that I can access these APIs?