Skip to content

Commit 68f5332

Browse files
committed
add PWA Wrapper troubleshooting page
1 parent 9623e00 commit 68f5332

4 files changed

Lines changed: 53 additions & 4 deletions

File tree

content/en/docs/refguide/mobile/distributing-mobile-apps/pwa-wrapper/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ This PWA Wrapper documentation section includes the following topics:
3232
* Limitations: [PWA Wrapper Limitations](/refguide/mobile/distributing-mobile-apps/pwa-wrapper/pwa-wrapper-limitations/)
3333
* Deep linking guide: [PWA Wrapper Deep Linking](/refguide/mobile/pwa-wrapper/pwa-wrapper-deep-linking/) explains how to handle inbound and outbound deep links
3434
* Security and network access reference: [PWA Wrapper Security and Network Access](/refguide/mobile/pwa-wrapper/pwa-wrapper-security/) describes what the extension downloads, what local paths it scans, and which binaries it bundles
35+
* Troubleshooting: [Troubleshoot PWA Wrapper](/refguide/mobile/pwa-wrapper/pwa-wrapper-troubleshooting/) lists known issues and solutions
3536

3637
## Typical Use Cases
3738

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: "Troubleshoot PWA Wrapper"
3+
url: /refguide/mobile/pwa-wrapper/pwa-wrapper-troubleshooting/
4+
weight: 60
5+
description: "Known issues and solutions for PWA Wrapper."
6+
---
7+
8+
## Introduction
9+
10+
This page describes known issues you may encounter when building or testing PWA Wrapper apps, along with the steps to resolve them.
11+
12+
## Android
13+
14+
### App Cannot Connect to localhost on a Physical Device{#android-localhost}
15+
16+
**Symptom**: When you set the runtime URL to a localhost address (for example, `http://localhost:8080`) and install the app on a physical Android device, the app fails to load and shows the following error:
17+
18+
```
19+
Page Load Error
20+
net::ERR_CACHE_MISS
21+
```
22+
23+
{{< figure src="/attachments/refguide/mobile/pwa-wrapper/localhost-cache-miss-error.png" alt="Page Load Error showing net::ERR_CACHE_MISS on Android" max-width="400px" >}}
24+
25+
**Cause**: Two things are required for a physical Android device to reach a localhost server on your machine:
26+
27+
1. The app must have the `INTERNET` permission. Without it, the Android OS blocks all outbound network traffic.
28+
2. The device must have a port forwarding rule from its own localhost to your machine's localhost. Android devices do not forward ports automatically.
29+
30+
**Solution**:
31+
32+
1. In the PWA Wrapper builder, go to the **Permissions** step and enable the **INTERNET** permission.
33+
34+
For general guidance on permissions, see [Build PWA Wrapper Apps](/refguide/mobile/pwa-wrapper/build-pwa-wrapper-apps/).
35+
36+
1. Connect the Android device to your machine via USB and make sure [USB debugging](https://developer.android.com/studio/debug/dev-options) is enabled on the device.
37+
38+
1. Run the following ADB command to forward port 8080 from the device to your machine:
39+
40+
```shell
41+
adb reverse tcp:8080 tcp:8080
42+
```
43+
44+
If your Mendix runtime uses a different port, replace `8080` with the correct port number on both sides.
45+
46+
1. Rebuild and reinstall the app with the localhost runtime URL.
47+
48+
The app can now reach the Mendix runtime running on your development machine.
49+
50+
{{% alert color="info" %}}
51+
The `adb reverse` rule applies only to the current USB session. You must re-run the command each time you reconnect the device or restart ADB.
52+
{{% /alert %}}

content/en/docs/refguide/mobile/using-mobile-capabilities/push-notifications/notif-pwa-wrapper.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,6 @@ Create a new nanoflow (for example, `ACT_InitAppLifecycle`) and add the followin
191191
1. Set the parameters:
192192
* **onResume**: select the `ACT_RequestPushNotifications` nanoflow you created earlier
193193

194-
The nanoflow is shown below:
195-
196-
{{< figure src="/attachments/refguide/mobile/push-notifications/notif-pwa-wrapper/pwa-wrapper-lifecycle-nanoflow.png" alt="App lifecycle nanoflow calling ListenToAppLifecycle and ACT_RequestPushNotifications" max-width="80%" >}}
197-
198194
### Step 4: Add the Events Widget to the Home Page
199195

200196
1. Open your app's default home page in Studio Pro.
42.4 KB
Loading

0 commit comments

Comments
 (0)