# Router.navigate function working in development, but not in production

**URL:** <https://community.developer.atlassian.com/t/router-navigate-function-working-in-development-but-not-in-production/91287>\
**Category:** Forge UI Kit and Custom UI\
**Tags:** forge\
**Created:** [April 18, 2025, 4:27pm UTC](https://community.developer.atlassian.com/t/router-navigate-function-working-in-development-but-not-in-production/91287 "2025-04-18T16:27:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![AbelHaynes](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/abelhaynes/32/53445_2.png) [@AbelHaynes](https://community.developer.atlassian.com/u/AbelHaynes)\
**Post date:** [April 18, 2025, 4:27pm UTC](https://community.developer.atlassian.com/t/router-navigate-function-working-in-development-but-not-in-production/91287/1 "2025-04-18T16:27:49Z")

</div>

I am making a UI Kit global page app. The app is completed and fully functional in develop, but when I push to production, the router.navigate function stops working.

In the documentation, it says the router is in the preview stage. It also says that preview stage objects are not available to production environment by default, but that you can opt into using the feature. Is this my issue? I can not find any way to get these permissions.

See these pages for reference on the preview features for “router” that I need access to in production environment!

[https://developer.atlassian.com/platform/forge/apis-reference/ui-api-bridge/router/#:~:text=The%20router%20object%20enables%20you,on%20the%20user’s%20browser%20configuration.](https://developer.atlassian.com/platform/forge/apis-reference/ui-api-bridge/router/#:~:text=The%20router%20object%20enables%20you,on%20the%20user's%20browser%20configuration.)

[https://developer.atlassian.com/platform/forge/apis-reference/ui-api-bridge/router/#:~:text=The%20router%20object%20enables%20you,on%20the%20user’s%20browser%20configuration.%C2%A0%20https://developer.atlassian.com/platform/forge/whats-coming/](https://developer.atlassian.com/platform/forge/apis-reference/ui-api-bridge/router/#:~:text=The%20router%20object%20enables%20you,on%20the%20user's%20browser%20configuration.%C2%A0%20https://developer.atlassian.com/platform/forge/whats-coming/)

---

<div class="post-metadata">

**Author:** ![SolomanWeng](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/solomanweng/32/50858_2.png) [@SolomanWeng](https://community.developer.atlassian.com/u/SolomanWeng)\
**Post date:** [April 22, 2025, 2:07am UTC](https://community.developer.atlassian.com/t/router-navigate-function-working-in-development-but-not-in-production/91287/2 "2025-04-22T02:07:20Z")

</div>

Hi, @AbelHaynes

This feature should work as expected in the `production` environment without additional setup.

Would you mind share a bit detail around how it’s not working for you so we can try to replicate the issue.

Additionally, the common reasons that the `router.navigate` fails to work could because:

1. the content the app is trying to navigate to does not exist
2. the app does not have permission to navigate to the target content

you can try observe in the network tab in the browser to see if there are related errors on the network requests triggered by the `router.navigate`

Thanks!

---

<div class="post-metadata">

**Author:** ![AbelHaynes](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/abelhaynes/32/53445_2.png) [@AbelHaynes](https://community.developer.atlassian.com/u/AbelHaynes)\
**Post date:** [April 22, 2025, 10:17pm UTC](https://community.developer.atlassian.com/t/router-navigate-function-working-in-development-but-not-in-production/91287/3 "2025-04-22T22:17:04Z")

</div>

Hello @SolomanWeng , thanks for reaching out!

After some more troubleshooting, I was able to narrow down the issue to requests I am making to firebase storage using the firebase SDK. The error I receive in the console is a 25 second timeout error.

The code works fine in tunnel, but not when deploying to any environment. Is this a common issue? How can I access my firestore database when not running on my local machine?

See code below for firestore

```auto
import admin from "firebase-admin";
import { storage, webTrigger } from "@forge/api";
import fs from "fs";
import { ProjectSettingsPage } from "@forge/ui";

// Load Firebase credentials
const serviceAccount = {
    type: process.env.FB_TYPE,
    project_id: process.env.FB_PROJECT_ID,
    private_key_id: process.env.FB_PRIVATE_KEY_ID,
    private_key: `-----BEGIN PRIVATE KEY-----\n${process.env.FB_PRIVATE_KEY.replace(/\\n/g, '\n')}\n-----END PRIVATE KEY-----\n`,
    client_email: process.env.FB_CLIENT_EMAIL,
    auth_uri: process.env.FB_AUTH_URI,
    auth_provider_x509_cert_url: process.env.FB_AUTH_PROVIDER_X509_CERT_URL,
    client_x509_cert_url: process.env.FB_CLIENT_X509_CERT_URL,
    universe_domain: process.env.UNIVERSE_DOMAIN
}
// Initialize Firebase Admin SDK
if (!admin.apps.length) {
    admin.initializeApp({
        credential: admin.credential.cert(serviceAccount),
    });
}

const db = admin.firestore();

// Function to store web trigger in Firestore
export async function storeWebTrigger(webTrigURL, trimURL) {
    //////////////// The timeout occurs on the line below///////////////////
    return await db.collection("webTriggers").doc(trimURL).set({webTrigURL});
}

```

---

<div class="post-metadata">

**Author:** ![SolomanWeng](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/solomanweng/32/50858_2.png) [@SolomanWeng](https://community.developer.atlassian.com/u/SolomanWeng)\
**Post date:** [April 22, 2025, 10:34pm UTC](https://community.developer.atlassian.com/t/router-navigate-function-working-in-development-but-not-in-production/91287/4 "2025-04-22T22:34:44Z")

</div>

Hi, @AbelHaynes

Thanks for reaching out.

Please ensure that the firebase urls are whitelisted in the manifest file, so the egress connections is not blocked:

> **[Runtime egress permissions](https://developer.atlassian.com/platform/forge/runtime-egress-permissions/)**
>
> Manage runtime egress permissions to control external communications in your Forge app.

thanks.

---

<div class="post-metadata">

**Author:** ![AbelHaynes](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/abelhaynes/32/53445_2.png) [@AbelHaynes](https://community.developer.atlassian.com/u/AbelHaynes)\
**Post date:** [April 22, 2025, 11:43pm UTC](https://community.developer.atlassian.com/t/router-navigate-function-working-in-development-but-not-in-production/91287/5 "2025-04-22T23:43:29Z")

</div>

Hey @SolomanWeng,

I did include the firebase URL’s in the manifest. I tried different firebase URL’s to be thorough, but it does not work.

```auto
external:
    fetch:
        backend:
          - 'https://slack.com'
          - 'https://firestore.googleapis.com'
          - 'https://iam.googleapis.com'
          - 'https://oauth2.googleapis.com'
          - 'https://www.googleapis.com'
          - 'https://firestore.googleapis.com'
          - 'https://project-name.firebaseio.com'
          - 'https://us-central1-project-name-scheduling.cloudfunctions.net

```

---

<div class="post-metadata">

**Author:** ![SolomanWeng](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/solomanweng/32/50858_2.png) [@SolomanWeng](https://community.developer.atlassian.com/u/SolomanWeng)\
**Post date:** [April 23, 2025, 12:29am UTC](https://community.developer.atlassian.com/t/router-navigate-function-working-in-development-but-not-in-production/91287/6 "2025-04-23T00:29:32Z")

</div>

Hi, @AbelHaynes

Interesting. I think the connection issue can be coming from both Forge and Firebase side. You might want to check if your Firebase also whitelist the communication from the Forge apps:

Please refer to:

> **[IP addresses and domains for Atlassian Cloud products | Atlassian Support](https://support.atlassian.com/organization-administration/docs/ip-addresses-and-domains-for-atlassian-cloud-products/)**
>
> Get the domain names, IP addresses, and ranges that you need to whitelist and allow access to Atlassian cloud products.

for more details.

Additionally, please also share the details on the connection issues you have seen (e.g. network requests, or console errors etc.)

In the mean time, I will also try connect you with team that have dedicated knowledge on this. Thanks.

---

<div class="post-metadata">

**Author:** ![SolomanWeng](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/solomanweng/32/50858_2.png) [@SolomanWeng](https://community.developer.atlassian.com/u/SolomanWeng)\
**Post date:** [April 23, 2025, 2:11am UTC](https://community.developer.atlassian.com/t/router-navigate-function-working-in-development-but-not-in-production/91287/7 "2025-04-23T02:11:18Z")

</div>

Additionally, forge runtime support only `https` communication with additional restrictions after deploy to the site, `forge tunnel` might not have same restriction.

> **[Native Node.js runtime](https://developer.atlassian.com/platform/forge/function-reference/nodejs-runtime/#https-only)**
>
> Utilize the Node.js runtime in Forge for enhanced app functionality and REST API interaction.

Hence, please also try check if Firebase uses the support communication as indicated in the documentation.

It is also possible to utilise

> **[Storage](https://developer.atlassian.com/platform/forge/runtime-reference/storage-api/)**
>
> Discover Forge's hosted storage capabilities for persistent and cache data management.

as an alternative, thanks!

---

<div class="post-metadata">

**Author:** ![AbelHaynes](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/abelhaynes/32/53445_2.png) [@AbelHaynes](https://community.developer.atlassian.com/u/AbelHaynes)\
**Post date:** [April 29, 2025, 5:21pm UTC](https://community.developer.atlassian.com/t/router-navigate-function-working-in-development-but-not-in-production/91287/8 "2025-04-29T17:21:18Z")

</div>

Hello all,

The issue is that forge node.js sandbox blocks essential functionalities for the firebase SDK to work. The SDK worked when tunneling because I was using my local environment instead of the actual atlassian environment.

My workaround was to use a REST API to access my storage. Firebase thankfully has one.
