Summary
I have the scope set to /app in my next.config.js, and my start_url in my manifest is /app/. However, I'm having an issue where the address bar is showing up in my PWA, even though I have display set to standalone in my manifest.
My manifest:
{
"name": "...",
"short_name": "...",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "/maskable-icon.png",
"sizes": "1024x1024",
"type": "image/png",
"purpose": "any maskable"
}
],
"theme_color": "#FFFFFF",
"background_color": "#FFFFFF",
"start_url": "/app/",
"display": "standalone",
"orientation": "portrait"
}
My next.config.js properties for next-pwa:
pwa: {
dest: 'public',
scope: '/app',
disable: process.env.NODE_ENV === 'development',
dynamicStartUrlRedirect: '/login',
reloadOnOnline: false,
},
Versions
next-pwa: 5.3.1
next: 11.1.2
How To Reproduce
Steps to reproduce the behavior:
- Set up Next.js with next-pwa and the properties above
- Go to the app on Android and click the "Add to Home Screen" banner that shows up at the bottom
- Once the app is installed, open it up and observe that the address bar shows up at the top
Expected Behaviors
I would expect the address bar to not show up.
Screenshots

Additional Context
I noticed that if I don't set the scope in my next.config.js, then it works fine and there is no address bar. However, this doesn't work for me because I don't want to cache my marketing pages.
According to this Stack Overflow answer, this issue could be occurring because my app is navigating outside of the scope.
I looked at the codebase for next-pwa and saw that a / is being added to the scope:
|
const _scope = path.posix.join(scope, '/') |
So this could be occurring because the the user is starting at /app, but /app is not technically inside of /app/.
Is the / at the end necessary? If not, maybe we could remove it, or at least expose an option to remove it.
Summary
I have the scope set to
/appin mynext.config.js, and mystart_urlin my manifest is/app/. However, I'm having an issue where the address bar is showing up in my PWA, even though I have display set tostandalonein my manifest.My manifest:
{ "name": "...", "short_name": "...", "icons": [ { "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" }, { "src": "/maskable-icon.png", "sizes": "1024x1024", "type": "image/png", "purpose": "any maskable" } ], "theme_color": "#FFFFFF", "background_color": "#FFFFFF", "start_url": "/app/", "display": "standalone", "orientation": "portrait" }My next.config.js properties for next-pwa:
Versions
next-pwa: 5.3.1next: 11.1.2How To Reproduce
Steps to reproduce the behavior:
Expected Behaviors
I would expect the address bar to not show up.
Screenshots
Additional Context
I noticed that if I don't set the scope in my next.config.js, then it works fine and there is no address bar. However, this doesn't work for me because I don't want to cache my marketing pages.
According to this Stack Overflow answer, this issue could be occurring because my app is navigating outside of the scope.
I looked at the codebase for
next-pwaand saw that a/is being added to thescope:next-pwa/index.js
Line 71 in 1daeb9a
So this could be occurring because the the user is starting at
/app, but/appis not technically inside of/app/.Is the
/at the end necessary? If not, maybe we could remove it, or at least expose an option to remove it.