Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix electron v8 #2141

Merged
merged 12 commits into from
Jul 24, 2024
Merged

Fix electron v8 #2141

merged 12 commits into from
Jul 24, 2024

Conversation

djskinner
Copy link
Contributor

@djskinner djskinner commented May 16, 2024

Goal

Fix the electron tests on v8 branch

Design

Set max_body_size: 25mb on the verdaccio config (local npm where packages are published for the electron tests) to allow for the increased size of @bugsnag/react-nativein v8.

Note the increase in size is expected and is because it contains both prefabs (which are unstripped and have a ton of extra debug info), and the classic JNI .so files. Depending on peoples builds only one gets used, and prefabs are processed before being included in the app. The size of .apk files doesn't get affected, just the .aar files.

@djskinner djskinner changed the base branch from next to integration/v8 May 16, 2024 15:23
@djskinner djskinner force-pushed the fix-electron-v8 branch 7 times, most recently from 9510cc2 to 23c3ac6 Compare May 17, 2024 09:05
Copy link

github-actions bot commented May 20, 2024

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 45.24 kB 13.75 kB
After 45.24 kB 13.75 kB
± No change No change

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against 37b6b0d

@gingerbenw
Copy link
Member

@djskinner you can resolve the electron issue by pinning @vercel/webpack-asset-relocator-loader to 1.7.3 - a new version was released last week and seems to have introduced this issue. I also have the fix in #2143

@djskinner djskinner marked this pull request as ready for review June 28, 2024 14:27
"1": "{TYPE:string}"
}
}],
"stacktrace": [],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stacktraces now look like this:

                {
                    "errorClass": "ReferenceError",
                    "errorMessage": "something bad",
                    "type": "electronnodejs",
                    "stacktrace": [
                        {
                            "file": ".webpack/main/index.js",
                            "method": "ClientRequest.notify",
                            "lineNumber": 2,
                            "columnNumber": 86370,
                            "code": {
                                "1": "/*! For license information please see index.js.LICENSE.txt */",
                                "2": "(()=>{var e={1821:e=>{e.exports=class{constructor(e,a,i,n=new Date){this.type=i,this.message=e,this.metadata=a,this.timestamp=n}toJSON(){return{type:this.type,name:this.message,timestamp:this.timestam"
                            }
                        },
                        {
                            "file": "node:events",
                            "method": "ClientRequest.emit",
                            "lineNumber": 531,
                            "columnNumber": 35
                        },
                        {
                            "file": "node:electron/js2c/browser_init",
                            "method": "SimpleURLLoaderWrapper.<anonymous>",
                            "lineNumber": 2,
                            "columnNumber": 114542
                        },
                        {
                            "file": "node:events",
                            "method": "SimpleURLLoaderWrapper.emit",
                            "lineNumber": 519,
                            "columnNumber": 28
                        }
                    ],
                    "message": "something bad"
                }

With the original fixture, the error is:

   ✖ Then the contents of an event request matches "main/breadcrumbs/network/error.json" # test/electron/features/support/steps/request-steps.js:202
       Error: expect.toContainPayload(expected) - Nearest match (of 1):
         .events.0.exceptions.0.stacktrace.0.file: Expected an exact match
           Expected: ./src/errors.js
           Received: node:events

         .events.0.exceptions.0.stacktrace.0.lineNumber: Expected an exact match
           Expected: 18
           Received: 519

         .events.0.exceptions.0.stacktrace.0.code: Expected a value but was undefined
           Expected: {
         "1": "{TYPE:string}"
       }
           Received: undefined

           at World.<anonymous> (/Users/dan.skinner/bugsnag-js/test/electron/features/support/steps/request-steps.js:212:20)

@djskinner djskinner merged commit 0c0fd2e into integration/v8 Jul 24, 2024
59 of 65 checks passed
@djskinner djskinner deleted the fix-electron-v8 branch July 24, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants