pwa-builder / PWABuilder

The simplest way to create progressive web apps across platforms and devices. Start here. This repo is home to several projects in the PWABuilder family of tools.
https://docs.pwabuilder.com
Other
2.69k stars 282 forks source link

Error generating android package #2249

Closed erpstuff closed 2 years ago

erpstuff commented 2 years ago

I received the following error when generating a package for https://apex.oracle.com/pls/apex/erpstuffords/r/apex_mobile

Error: Error generating Android package. Status code: 500 Error: Internal Server Error Details: Error generating app package: maximum redirect reached at: https://apex.oracle.com/pls/apex/erpstuffords/r/apex_mobile/login?session=15149713533462 stack: FetchError: maximum redirect reached at: https://apex.oracle.com/pls/apex/erpstuffords/r/apex_mobile/login?session=15149713533462 at ClientRequest. (/app/node_modules/node-fetch/lib/index.js:1504:15) at ClientRequest.emit (events.js:314:20) at HTTPParser.parserOnIncomingClient (_http_client.js:601:27) at HTTPParser.parserOnHeadersComplete (_http_common.js:122:17) at TLSSocket.socketOnData (_http_client.js:474:22) at TLSSocket.emit (events.js:314:20) at addChunk (_stream_readable.js:297:12) at readableAddChunk (_stream_readable.js:272:9) at TLSSocket.Readable.push (_stream_readable.js:213:10) at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)

ghost commented 2 years ago

Hello erpstuff, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will investigate the issue and help solve it ASAP. Other community members may also look into the issue and provide feedback 🙌

JudahGabriel commented 2 years ago

I'm able to repro. Investigating.

Right now, it looks like the issue is that you have some bot prevention in place in your server that is redirecting PWABuilder's request for your manifest to a page that contains HTML. PWAbuilder expects JSON, and receives HTML.

Are you using any app management servers, like Cloudflare?

JudahGabriel commented 2 years ago

This is fixed by https://github.com/pwa-builder/PWABuilder/pull/2234, which is currently in PR, and should be released on Monday, November 29th.

In the meantime, to workaround this issue. when you build your Android package with PWABuilder, in the Android settings dialog, under Manifest URL, set the value to https://apex.oracle.com/pls/apex/erpstuffords/r/apex_mobile/manifest.json?v=21.2.0-15433212367893&lang=en

Give that workaround a try and see how it goes.

Meanwhile, I'll comment here when the fix is deployed.

erpstuff commented 2 years ago

Hi Judah, Thanks for your response and workaround of no use as it is even now showing and into more problems,

Uh Oh Your PWA needs more work, look above for details.

and showing Manifest and service workers 0.

This is a standard Oracle website and application and please check your workaround with you as well it might help to find the root cause.

Waiting for the fix for Oracle APEX.

Thanks