Forge tunnel stopped working for one app

Hey everyone! I have been spending the last four months developing two different apps for a client and one of them have stopped working for reasons I can’t understand.

It’s all related to forge tunnel.

The problems started when I added a fourth macro to my app. I added the macro - no problem. I added bodied layout - no problem. I removed bodied layout and switched instead to a macro config - that’s when issue started happening.

To be clear. I can deploy my app - no problem. It even “sort of” works when I run it non-locally (I can’t develop it to completion, but the code that’s there seems to run fine) but when I run forge tunnel I get this weird issue with node heap allocations.

So I try to remove the config from the manifest.yml and now when I run the code (after having deployed a new version) I can run forge tunnel and it outputs fine


 === Running forge lint…
No issues found.

=== Bundling code…
✔ Functions bundled.
✔ Resources bundled.
✔ Resources bundled.
✔ Resources bundled.
✔ Resources bundled.
✔ Resources bundled.
✔ Resources bundled.
✔ Resources bundled.

Listening for requests…

But when I go to confluence and run the macro, it just spins while nothing is showing up on my console.

Like I said, I’m developing two separate apps and forge tunnel works fine on the other one so its not firewall or ngrok issues (I assume).

This happens even if I completely remove the macro from the manifest and all associated files.

And whenever I add back the macro and the config, I get the heap allocation issues which look like this:

=== Running forge lint…

No issues found.

=== Bundling code…
✔ Functions bundled.

<— Last few GCs —>

[24040:00000186FF556000]    83863 ms: Mark-Compact 4042.0 (4132.0) → 4026.4 (4132.5) MB, pooled: 10 MB, 987.03 / 0.00 ms  (average mu = 0.136, current mu = 0.051) allocation failure; scavenge might not succeed
[24040:00000186FF556000]    84716 ms: Mark-Compact 4042.4 (4133.0) → 4028.6 (4134.5) MB, pooled: 7 MB, 815.41 / 0.00 ms  (average mu = 0.095, current mu = 0.044) allocation failure; scavenge might not succeed

<— JS stacktrace —>

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

1: 00007FF7F9951427 node::SetCppgcReference+16599
2: 00007FF7F98B4878 v8::base::CPU::num_virtual_address_bits+103288
3: 00007FF7FA4263B1 v8::Isolate::ReportExternalAllocationLimitReached+65
4: 00007FF7FA412F36 v8::Function::Experimental_IsNopFunction+3302
5: 00007FF7FA26F870 v8::internal::StrongRootAllocatorBase::StrongRootAllocatorBase+33904
6: 00007FF7FA268CBA v8::internal::StrongRootAllocatorBase::StrongRootAllocatorBase+6330
7: 00007FF7FA2644F5 v8::internal::ThreadIsolation::JitPageReference::Size+190613
8: 00007FF7F9BEDE2D BIO_ssl_shutdown+189
9: 7FF8000000000000

Here’s the relevant macro in the manifest.yml file:


  macro:
    - key: metadata
      resource: metadata-front
      render: native
      resolver:
        function: cd-resolver
      title: Metadata
      config:
        resource: metadata-config
        viewportSize: large
        render: native
        title: Metadata config
  function:
    - key: cd-resolver
      handler: index.cdHandler
resources:
  - key:  metadata-front
    path: src/frontend/metadata/index.tsx
  - key:  metadata-config
    path: src/frontend/metadata/config.tsx