Typescript application timeout when loading to Momentum firmware
### Describe the bug.
Hello,
I am developing a script for the Flipper Zero on the Momentum firmware. I have 5 classes and a main routine. At this point in my code, every time I add another function (no matter what it does) to one of the classes at this point, the "npm run start" command fails to load the script on the flipper with an "Error: timeout" response. The code itself loads and runs fine when I do not add another function to one of the classes.
I have a feeling I'm hitting some sort of timeout limit with the Javascript engine in use (mjs?). Can this be confirmed? If there is a timeout limit, what it is set to, and can the loading timeout be increased either via user or firmware update?
Any other ideas would be appreciated.
Relevant information:
**Firmware**
```
Momentum Mainline mntm-012 (31.12.25)
```
**Node Library**
```
automarauder@1.0.0 /home/user/flipperzero/scripts/automarauder
├── @next-flip/fz-sdk-mntm@1.0.0
└── typescript@5.6.3
```
### Reproduction
1. Add a significant number of functions to a class so load time increases.
2. Execute "npm run start".
3. Timeout occurs while attempting to run on Flipper Zero.
### Target
Momentum Mainline mntm-012 (31.12.25)
### Logs
**Failure with execution time after adding next method to class**
```Text
$ time npx npm run start
> automarauder@1.0.0 start
> npm run build && node node_modules/@next-flip/fz-sdk-mntm/sdk.js upload
> automarauder@1.0.0 build
> tsc && node node_modules/@next-flip/fz-sdk-mntm/sdk.js build
Connecting to Flipper at /dev/ttyACM0
Uploading application file
Launching application
Error: timeout
real 0m2.518s
user 0m1.208s
sys 0m0.276s
```
### Anything else?
I can provide the typescript code if required for debugging.
关闭于 2026-03-26 3 条评论