pwa-builder / cloudapk Goto Github PK
View Code? Open in Web Editor NEWBuild Android APK packages on the cloud
License: Other
Build Android APK packages on the cloud
License: Other
Question in detail
A clear and concise description of what you want to know or confused about.
Is your question related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe alternatives you've considered
A clear and concise description of any alternative solutions you've considered.
Additional context
Add any other details that will help understand the question.
I have successfully generated my PWA android app package. Now as a further step, I have to upload assetlinks.json
to my server's root folder to remove the address bar in the app. But what if I don't have access to the root folder? My site is built on Shopify. Shopify does not allow us to upload any file to its root, we have to upload it through its file settings or in assets, which will serve using CDN. So I don't have options to upload files that can be accessed through the URL like https://www.site.com/.well-known/assetlinks.json
.
So, Is there any solution for this issue?
Describe the bug
I created Store packages for my PWA by pointing PWABuilder to pwa.kiwix.org/www/index.html
. The Windows msix package created from this works just fine. Testing the Android .apk on my phone, the app installs correctly (after fighting Play Protect...), but on launching the app, I get a 404 Not Found page showing in the app. When I look carefully at the URL, I notice that it is pwa.kiwix.org/www/index.html.
with that erroneous period/full-stop at the end (see screenshot). I click three dots, and choose "Open in Microsoft Edge", and the same erroneous page opens in Edge for Android. In Edge (but not in the app), I can edit the URL and remove the period, in which case the page loads correctly.
Steps to reproduce
pwa.kiwix.org/www/index.html
. It will tell you that the PWA has a score of 150 points.Expected behavior
My PWA should work on Android.
Screenshots
Additional info:
I am getting an error page when trying to generate / download the Android APK. I have tried a couple of different PWA sites but still get the same error. Thank you in advance.
Is it possible to add Intent-Filters to the generated android APK ?
When my PWA is opened directly in a WebBrowser, I want to have the option to move to the native app. As it will have a beter (fullscreen) experience.
I looked into A2HS options for PWA but they are to user driven.
Once a uses cancels the inital request to install the app, the question is not returned.
Also does not seem to be possible to jump "installed" version of the PWA neither.
Question in detail
We have hit a problem that is caused by this tool using a TWA instead of a webview. TWAs seem to require chrome installed and a profile to be set up. Installing chrome using a script is not difficult, but setting up a user profile for chrome is more problematic.
Is there a way to have this tool use a webview instead of a TWA?
Is your question related to a problem? Please describe.
We have thousands of android phones that are handed out to different people daily (perhaps more frequently than that), and handed back later in the day. User profiles provide no added value, but require some effort to set up - manual effort is out of the question and it must be scriptable. Ideally, we'd prefer to avoid this whole TWA thing since it requires extra effort (needs a profile and an extra file on the server, etc).
Describe alternatives you've considered
Manual creation of the profile on each phone is out of the question.
Perhaps there's a way to create a profile using a script - eg like copying ~/.config/google-chrome/Default, or something along those lines?
It just seems like this TWA thing is adding effort for no benefit (in my situation), and having the option to use a webview would be useful.
I think I've managed to get this installed/etc and it seems to be running, but I'm not clear on how to actually use it.
I see that I should make a POST with json like in the readme, but I wonder if you could give an actual working example - like a curl command that produces a basic/useless apk. I think that'd help me make the final leap to see how it works end-to-end. I tried my own curl command using the object given in the readme, but I get some error in html, so I suspect I'm missing something basic:
$ curl 'localhost:3000/generateSignedApk' -X POST -H 'content-type: application/json' --data '{"packageId":"com.mycompany.myapp","host":"https://contoso.com","name":"My App","themeColor":"#2f3d58","navigationColor":"#2f3d58","backgroundColor":"#2f3d58","startUrl":"/","iconUrl":"https://contoso.com/images/512x512.png","maskableIconUrl":"https://contoso.com/images/maskable512x512.png","appVersion":"1.0.0","useBrowserOnChromeOS":true,"splashScreenFadeOutDuration":300,"enableNotifications":false,"shortcuts":"[]","signingInfo":{"fullName":"John Doe","organization":"Contoso","organizationalUnit":"Engineering Department","countryCode":"US"}'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>SyntaxError: Unexpected end of JSON input<br> at JSON.parse (<anonymous>)<br> at parse (/app/node_modules/body-parser/lib/types/json.js:89:19)<br> at /app/node_modules/body-parser/lib/read.js:121:18<br> at invokeCallback (/app/node_modules/raw-body/index.js:224:16)<br> at done (/app/node_modules/raw-body/index.js:213:7)<br> at IncomingMessage.onEnd (/app/node_modules/raw-body/index.js:273:7)<br> at IncomingMessage.emit (events.js:203:15)<br> at endReadableNT (_stream_readable.js:1145:12)<br> at process._tickCallback (internal/process/next_tick.js:63:19)</pre>
</body>
</html>
Describe the bug
When running the server in Docker and using a bash file, the server may timeout before returning the generated APK.
To Reproduce
We slightly tweaked the build and run procedure from the README.md instructions.
Steps to reproduce the behavior:
FROM pwabuilder.azurecr.io/pwa-android-build-box:latest as base
WORKDIR /app
COPY . .
ENV PORT 80
RUN npm install
volume /work
volume /tmp
CMD start.sh
#!/bin/sh
npm start &
wget -O- --post-file='/work/input.json' --header='Content-Type:application/json' 'http://localhost/GenerateSignedAPKZip' > /work/output.zip
kill $!
docker build . -t cloudapk-image
docker run --rm -it -v "...\temp":/tmp -v "...\CloudAPK-master":/work cloudapk-image
After 2 minutes (seems like it's the default expressjs timeout), the wget command retries the connect and eventually succeeds at getting the generated APK, while curl will return a (52) empty response error.
Expected behavior
Any command to generate an APK should not timeout before it is completed.
Screenshots
None.
Additional info (please complete the following information):
Additional context
By changing the server.ts to this :
var server = app.listen(port, () => {
console.log(`App listening on port ${port}`);
});
server.setTimeout(500000);
I was able to get an APK file without timing out. But I guess it's more of a patch than a sustainable fix.
Describe the bug
The icon of the generated APK doesn't seems to amend size and transparency of the original PWA icon.
See enclosed screenshots. The generated icon TWA/APK has a white circle background and the original size, positioning, are not kept.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A background transparent icon which keep ratio and positioning of the original PWA icon.
Screenshots
APK once installed on my phone:
Favicon specified in manifest.json (https://deckdeckgo.com/assets/favicon/android-chrome-512x512.png):
I'm getting the problem below and can't seem to get past it. Any pointers appreciated.
CloudAPK$ docker run -p 3000:80 --name cloudapk cloudapk-image
> [email protected] start /app
> node server.js
internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'llama-pack/dist/lib/TwaGenerator'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/app/build/llamaPackWrapper.js:6:24)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-02-20T06_07_46_967Z-debug.log
ubuntu 19.10 - cloned this repo - current commit is a23698e
Describe the bug
In the Next-steps.md
file, the 4th step ('Update your asset links file for production') requires the developer to choose Setup -> App signing
in the Google Play Console and then copy their SHA-256 fingerprint from there. The name in the nav bar on the left of the page has now changed to 'App integrity' (as shown in the picture below), so there should be a correction from Setup -> App signing
to Setup -> App integrity
.
The same applies to the 'Add production fingerprint' section in the Asset-links.md
file.
Screenshot
Changes
In both files:
Setup -> App integrity
instead of Setup -> App signing
.I install cloudAPK and install JDK and android tool and provide path in the development environment. npm run dev and test the demo webboard.app manifest. But I am getting following error. I tried few solution from internet but did not work out.
Any solution would be appreciate.
Is there a way to disable SSL check in Java? or
How to add window truststore (Trusted root certifcate) all certificate to the jdk keystore?
Failed. Status code 500, Error: Internal Server Error, Details: Error generating app package:
Command failed: gradlew.bat assembleRelease --stacktrace
Exception in thread "main" javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:350)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:293)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:288)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1356)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.onConsumeCertificate(CertificateMessage.java:1231)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.consume(CertificateMessage.java:1174)
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:444)
at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:422)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:183)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:171)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1408)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1314)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:440)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:411)
at java.base/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1592)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:250)
at org.gradle.wrapper.Download.downloadInternal(Download.java:67)
at org.gradle.wrapper.Download.download(Download.java:52)
at org.gradle.wrapper.Install$1.call(Install.java:62)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at java.base/sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:439)
at java.base/sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:306)
at java.base/sun.security.validator.Validator.validate(Validator.java:264)
at java.base/sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:313)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:222)
at java.base/sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129)
at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1340)
... 24 more
Hello,
I tried emailing your team and wasn't getting a response, so I'm posting the issue here.
Background
I got an error generating an Android package with just the default settings. I emailed the PWAB team (Judah, David) did note that I was using the correction SDK version (30.0.3) and suggested that I seek help from the Bubblewrap team instead.
Failed. Status code 500, Error: Internal Server Error, Details: Error generating app package: Error: Command failed: "/home/ubuntu/api/CloudAPK/android-sdk/build-tools/30.0.3/zipalign" -v -f -p 4 /tmp/pwabuilder-cloudapk--24177-thSWAhVabhJC/app/build/outputs/apk/release/app-release-unsigned.apk /tmp/pwabuilder-cloudapk--24177-thSWAhVabhJC/app-release-unsigned-aligned.apk
I posted the issue to their GitHub on got the following response.
GoogleChromeLabs/bubblewrap#552
Response from Bubblewrap team (Andrew)
Recent versions of the Gradle plugin will automatically zipalign the APK, and calling zipalign in those cases is redundant. To reflect this, the Bubblewrap CLI only verifies the APK is zipaligned.
https://github.com/GoogleChromeLabs/bubblewrap/blob/d8019d0aef42d64b0590bf223d22b4ad0f5e0575/packages/cli/src/lib/cmds/build.ts#L117-L123
ClouldAPK seems to be still calling zipalign.
CloudAPK/build/bubbleWrapper.ts
Lines 136 to 145 in dbe52dd
twaManifest.shortcuts.map is not a function
Describe the bug
The aspect ratio of the splash screen doesn't seems to be respected while creating a APK/TWA from a PWA with the PWABuilder.
See screenshots, this has for effect to generate a splash which is not sharp enough
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A sharp splash screen
Screenshots
APK:
PWA:
Reproduction Steps:
https://material.money/
as the URL on the home page and click start
Expected Behaviour:
An APK is downloaded
Actual Behaviour:
An error message is displayed
Error generating signed APK: Error: ENOSPC: no space left on device, copyfile '/app/node_modules/llama-pack/template_project/gradlew' -> '/tmp/pwabuilder-cloudapk-18MEYbrvOJbUzs/gradlew'
Generation failed on 3/3 attempts
Describe the bug
Probably this bug is specifically related to Github-pages but anyway let me show you.
/.well-known/assetlinks.json is not served through Github-pages
To Reproduce
You can see that my file is here in the right folder. https://github.com/canbax/namaz-vakti/tree/gh-pages/.well-known
but if you go and open https://canbax.github.io/namaz-vakti/.well-known/assetlinks.json you see 404. My project is actively deployed here https://canbax.github.io/namaz-vakti/
When I put my file to the root, not in the ".well-known" folder it was visible but now it is not.
Describe the bug
Failed. Status code 500, Error: Internal Server Error, Details: Error generating app package: Error: Command failed: gradlew.bat assembleRelease --stacktrace
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The error isn't displaying.
Additional info (please complete the following information):
I deployed the provided json file (this path is accessible: https://ricette.co.il/.well-known/assetlinks.json).
Then I tested the provided APK and installed it on my device - but I see the url bar shows.
How can I fix this?
Question in detail
Hello,
I have 3 PWA in one application and i want to upload them to Play Store but just one app it showing correctly because of assetslink.json i have just one and the other app must have the same file but with different informations inside.
is there way to solve that please ?
Hi, i'm testing my apk, it works fine, but I added some stuff to my website, but it doesn't show in app. why?
When trying to build for https://qrsnapper.com, web server crashes. It seems the issue is that Android doesn't like the package name being generated for the app:
error: attribute 'package' in tag is not a valid Android package name: 'com.myapp.Snap QR'.
One alternative is to use reverse the domain name for the app and append ".twa" to the end. For qrsnapper, the package-name becomes com.qrsnapper.twa
.
More details on Android practices and restrictions for the application-ids are here: https://developer.android.com/studio/build/application-id
I found out the key that Play Store uses to sign the app can be found on Play Console (as also explained here) by following these steps:
The instructions for removing the browser address bar explain how the same can be achieved using the Asset Links Tool app. I suggest updating the instructions with this alternative as I can imagine many developers find this more convenient, especially if they don't have an Android phone (granted they have authorized access to this section of the Play Console).
Question in detail
How to add Andriod native push notifications? say using Firebase cloud Messaging SDK.
Is your question related to a problem? Please describe.
I understand that I have to 1. Include the Firebase SDK & 2. Put onMessageReceived
inside main activity
But given PWA builder is a Node application that builds APK, I don't know where to start integrating.
Describe alternatives you've considered
I may have to create a brand new Andriod studio project and add TwaLauncher
, from android-browser-helper
as these answers mention?
Additional context
https://stackoverflow.com/questions/69148921/creating-native-andriod-push-notifications-for-app-built-with-pwa-builder
The Generate APK Unsigned does not install
When he installs it says "The app was not installed" how to proceed?
what to do problems with downloading an unrecognized APK file to google play
Warning
This APK file contains unused resources and code that end up with users. You can reduce the size of the app using the Android App Bundle. Because you haven't optimized the app for different device configurations, users have to download and install more data. Large apps take up a lot of space on your devices, and users install them less frequently.
Decision
Use the Android App Bundle to automatically optimize the app for different device configurations, or manage optimization yourself with multiple APK files.
Describe the bug
Hi there.
I used pwa builder to build app for Google Play. All worked fine, no issues. Uploaded .aab to the store, it is approved and downloadable.
However now i would like to change splash screen. But when i go to PWAbuilder to make an update on version, after i add my url to analyse it takes ages to analyse the left bar ( about 20 minutes) and then fails them.
To Reproduce
Go to following link: https://www.pwabuilder.com/
Then implement my url: clicktoplay.ru/
And it just doesnt analyse it correctly.
Any advice will be appreciated.
Question in detail
Once I've downloaded the zip with the source checkbox check, I guess I have everything to compile the app myself, if so which command do i need ? (i'm quite new to app development, and your website really help me to jump the gap )
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.