GGT_APP_CRASH but I don't understand why

Hello, my app crashes sometimes and I've never managed to understand why. I'd love some help on this. - app: getsimio - environment: production - traceId: 43e1e1bf38adb3e15a09e042a187d186
21 Replies
Chocci_Milk
Chocci_Milk5mo ago
I'm looking into this I do see where the errors are happening but not the cause Does this happen quite frequently?
Thibaut Regerat
Thibaut RegeratOP5mo ago
Hello, yes it happened 288 times in the last 30 days It happened again a few minutes ago fbe6bce46e274d3f5bc00b9cab70a93d
Chocci_Milk
Chocci_Milk5mo ago
Looking into this now The last trace seems to have finished successfully I looked at the background action and there were no failures Let me dig some more because your app logs don't seem to be really telling me anything I don't see any GGT_APP_CRASH logs in the timespan around the error either I just see a bunch of timeouts I see a few different kinds of errors. Is there anywhere in your application where you're calling multiple actions in a chain? action1 > action2 > etc? What typically happens when you see [GraphQL] GGT_TRANSACTION_TIMEOUT: Can't commit a transaction after it has timed out is that you have an action at the top of the call stack that timed out and the other actions after it continued to run. The transaction would therefore be closed when trying to run the rest ^ thats just one example/possible explanation of what might be happening
Chocci_Milk
Chocci_Milk5mo ago
Alright. It looks like the issue might be caused by some throttling we do for apps that get really high traffic. The feature was removed yesterday for most apps (not yours). Before we can remove it for your application, you need to change your usage of Promise.all on line 23 of getCampaignStatsBetweenDates. Instead please use the p-map package (@^4.0.0) with concurrency set. https://www.npmjs.com/package/p-map
npm
p-map
Map over promises concurrently. Latest version: 7.0.3, last published: 4 months ago. Start using p-map in your project by running npm i p-map. There are 2510 other projects in the npm registry using p-map.
Chocci_Milk
Chocci_Milk5mo ago
Its our general rule of thumb that you use p-map instead of Promise.all whenever possible. Promise.all doesn't allow for concurrency settings which p-map does Your fetch all promise all might make more sense as sequencial fetches. The problem that Gadget/you might face because of pagination is a heap out of memory issue
Thibaut Regerat
Thibaut RegeratOP5mo ago
Ok I've changed it into sequential fetches But my deployment crashed :/ 81e8bd4ef3d82987cab401717aef8687
Thibaut Regerat
Thibaut RegeratOP5mo ago
No description
Chocci_Milk
Chocci_Milk5mo ago
Interesting Could you please send me the trace for that?
Thibaut Regerat
Thibaut RegeratOP5mo ago
Yes 81e8bd4ef3d82987cab401717aef8687 there are also 4 new packages, maybe it's that :/ "@sentry/node": "^9.12.0", "@sentry/react": "^7.0.0", "@sentry/tracing": "^7.120.3", "@sentry/vite-plugin": "^3.3.1",
Chocci_Milk
Chocci_Milk5mo ago
Thats definitely possible but let me double check I'm honestly wondering if its tailwind related
Thibaut Regerat
Thibaut RegeratOP5mo ago
oh
Chocci_Milk
Chocci_Milk5mo ago
I have to dig some more Just based on the errors that I see in the trace, it smells of tailwind but I want to be sure Ok, I'm not sure what it is but this node_modules/antd/es/alert/index.js and other logs like it are the issue This is the utility that's causing the issue: [--btn-bg:theme(colors.pink.500)] Or it would appear to be The initial error I see is from that package that I shared but from the deploy log it looks to be specifically the theme usage Wonder if you get the same error from redeploying or if something else will throw
Thibaut Regerat
Thibaut RegeratOP5mo ago
I feel that I've seen those errors since the beginning [--btn-bg:theme(colors.pink.500)] I try another deployment
Chocci_Milk
Chocci_Milk5mo ago
reading online about oom errors with vite build I'm wondering if it could be vite configs that need to be change as well
Thibaut Regerat
Thibaut RegeratOP5mo ago
The last deployment: 75559e099c9ddcec5c383b6b733acd67
Chocci_Milk
Chocci_Milk5mo ago
Not sure about this one It failed?
Chocci_Milk
Chocci_Milk5mo ago
GitHub
[Bug] JavaScript heap out of memory (Vite build works, Storybook w/...
What version of vite are you using? ^2.9.12 System info and storybook versions System: OS: Linux 5.10 Ubuntu 21.10 21.10 (Impish Indri) CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor Binaries: N...
Chocci_Milk
Chocci_Milk5mo ago
No description
Thibaut Regerat
Thibaut RegeratOP5mo ago
Ok i deploy the changes 2729b02877f423c843645827140f3041
Chocci_Milk
Chocci_Milk5mo ago
And it worked? We'll see Oh nice! Sourcemapping was the issue We turned off the throttling for your application as well btw
Thibaut Regerat
Thibaut RegeratOP5mo ago
Great! Thank you very much Antoine

Did you find this page helpful?