Giter VIP home page Giter VIP logo

cloudapk's People

Contributors

amrutha95 avatar andreban avatar dependabot[bot] avatar fluorescenthallucinogen avatar harshkapadia2 avatar jgw96 avatar judahgabriel avatar kbrons avatar khmyznikov avatar kyaa-dost avatar lee-leonardo avatar nmetulev avatar zateutsch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudapk's Issues

[Question] Bot Test

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.

[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?

[BUG] An erroneous . is added to end of PWA web address in Android apk

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

  1. Open PWABuilder and point it to pwa.kiwix.org/www/index.html. It will tell you that the PWA has a score of 150 points.
  2. Create package for Android
  3. Download package, unzip and install apk
  4. Run the installed app

Expected behavior

My PWA should work on Android.

Screenshots

image

Additional info:

  • OS: Windows 10 (Android 11)
  • Browser Microsoft Edge
  • Version 91.0

Intent-Filters

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] Is there a way to use webview in place of TWA?

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.

Any examples for how to use CloudAPK?

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> &nbsp; &nbsp;at JSON.parse (&lt;anonymous&gt;)<br> &nbsp; &nbsp;at parse (/app/node_modules/body-parser/lib/types/json.js:89:19)<br> &nbsp; &nbsp;at /app/node_modules/body-parser/lib/read.js:121:18<br> &nbsp; &nbsp;at invokeCallback (/app/node_modules/raw-body/index.js:224:16)<br> &nbsp; &nbsp;at done (/app/node_modules/raw-body/index.js:213:7)<br> &nbsp; &nbsp;at IncomingMessage.onEnd (/app/node_modules/raw-body/index.js:273:7)<br> &nbsp; &nbsp;at IncomingMessage.emit (events.js:203:15)<br> &nbsp; &nbsp;at endReadableNT (_stream_readable.js:1145:12)<br> &nbsp; &nbsp;at process._tickCallback (internal/process/next_tick.js:63:19)</pre>
</body>
</html>

[BUG]

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:

  1. Change the Dockerfile to this :
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
  1. Create the start.sh file :
#!/bin/sh
npm start &

wget -O- --post-file='/work/input.json' --header='Content-Type:application/json' 'http://localhost/GenerateSignedAPKZip' > /work/output.zip
kill $!
  1. Create the Docker Image
docker build . -t cloudapk-image
  1. Run the Docker Container :
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):

  • W10 Pro. Running latest Docker

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.

APK icon off and not transparent background

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:

  1. Go to https://www.pwabuilder.com/
  2. Generate a TWA for https://deckdeckgo.com

Expected behavior
A background transparent icon which keep ratio and positioning of the original PWA icon.

Screenshots

APK once installed on my phone:

Screenshot_20200420-194059

Favicon specified in manifest.json (https://deckdeckgo.com/assets/favicon/android-chrome-512x512.png):

android-chrome-512x512

Cannot find module 'llama-pack/dist/lib/TwaGenerator'

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

[BUG] Old name for 'App integrity' in `Next-steps.md` and `Asset-links.md`

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:

  • The text should be Setup -> App integrity instead of Setup -> App signing.
  • The image will have to be replaced with the latest version.

Error in Generating App (Java SSLHandshakeException)

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

[BUG] zipalign issue "Failed. Status code 500, Error: Internal Server Error, Details: Error generating app package"

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.

private async optimizeApk(apkFilePath: string): Promise<string> {
console.info("Optimizing the APK...");
const optimizedApkPath = `${this.projectDirectory}/app-release-unsigned-aligned.apk`;
await this.androidSdkTools.zipalign(
apkFilePath, // input file
optimizedApkPath, // output file
);
return optimizedApkPath;
}

APK splash ratio / sharpness

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:

  1. Go to https://www.pwabuilder.com/
  2. Generate a TWA for https://deckdeckgo.com

Expected behavior
A sharp splash screen

Screenshots

APK:

Screenshot_20200420-201215

PWA:

Screenshot_20200420-201553

Generating Signed APK failing with `no space left on device`

Reproduction Steps:

  1. Enter https://material.money/ as the URL on the home page and click start
  2. Click on 'Build a PWA', then on 'Android', then 'Download'

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

[BUG]

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.

[BUG] Command failed: gradlew.bat assembleRelease --stacktrace

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:

  1. Clone the repository.
  2. Run "npm install".
  3. Run "npm start dev".
  4. Go to localhost:3333, click "Submit".
    Config is the default.

Expected behavior
The error isn't displaying.

Screenshots
image

Additional info (please complete the following information):

  • OS: Windows 10 Home x64
  • Browser chrome
  • node v10.16.2
  • 0 vulnerabilities after "npm install"

[Question]

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 ?

Building APK failing for qrsnapper.com

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

Play Store App signing key available on Play Console

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:

  1. Selecting your app
  2. Setup --> App signing
  3. App signing key certificate --> "SHA-256 certificate fingerprint"

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).

Creating native Android push notifications for App built with PWA builder

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

Output App Bundles instead of APKs

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.

[BUG]

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]

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 )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.