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

Cannot run in Brave Browser #25266

Open
thanhtutzaw opened this issue Dec 24, 2022 · 2 comments
Open

Cannot run in Brave Browser #25266

thanhtutzaw opened this issue Dec 24, 2022 · 2 comments
Labels
E2E Issue related to end-to-end testing OS: windows Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.

Comments

@thanhtutzaw
Copy link

thanhtutzaw commented Dec 24, 2022

Current behavior

Brave opened . then cypress's brave opened and this happened.
Screenshot (127)

Desired behavior

Need to open in Brave

Test code to reproduce

`
//cypress.config.js
const { defineConfig } = require("cypress");
const execa = require('execa');
const findBrowser = async () => {
// the path is hard-coded for simplicity
const browserPath =
'C:/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe'

const result = await execa(browserPath, ['--version']);
// STDOUT will be like "Brave Browser 77.0.69.135"
// const [, version] = /Brave Browser (\d+.\d+.\d+.\d+)/.exec(result.stdout);
// const majorVersion = parseInt(version.split('.')[0]);
return {
name: 'Brave',
channel: 'stable',
family: 'chromium',
displayName: 'Brave',
version:"1.46.144",
path: browserPath,
majorVersion:"146144",
};
}
module.exports = defineConfig({
e2e: {
async setupNodeEvents(on, config) {
const browser = await findBrowser();
return {
browsers: config.browsers.concat(browser),
};
}
}
});
`

Cypress Version

latest

Node version

latest

Operating System

window 10 2015

Debug Logs

GET /__/ 200 22.253 ms - -
GET /__/ 304 1.475 ms - -
GET /seed?osname=win&channel=stable&milestone=108 200 903.318 ms - -
POST /extensions 200 1705.740 ms - -
POST /extensions 200 1715.777 ms - -
POST /extensions 200 1722.824 ms - -
POST /extensions 200 1734.915 ms - -
POST /extensions 200 1738.853 ms - -
POST /extensions 200 1731.954 ms - -
GET /__/ 304 0.969 ms - -
GET /__/ 304 1.092 ms - -
GET /__/ 304 0.841 ms - -
GET /__/ 304 1.129 ms - -
GET /__/ 304 0.948 ms - -
GET /__/ 304 0.675 ms - -
GET /__/ 200 0.769 ms - -
GET /__/ 304 2.241 ms - -
GET /__/ 304 3.760 ms - -
GET /__/ 304 2.115 ms - -
GET /seed?osname=win&channel=stable&milestone=108 200 548.559 ms - -
POST /extensions - - ms - -
POST /extensions - - ms - -
POST /extensions - - ms - -
POST /extensions - - ms - -
POST /extensions - - ms - -
POST /extensions - - ms - -
GET /__/ 200 0.871 ms - -
GET /__/ 304 1.718 ms - -
GET /seed?osname=win&channel=stable&milestone=108 200 542.956 ms - -
GET /__/ 200 0.607 ms - -
GET /__/ 304 1.212 ms - -
GET /__/ 304 2.341 ms - -
GET /__/ 304 1.088 ms - -
GET /seed?osname=win&channel=stable&milestone=108 200 544.136 ms - -
Couldn't find tsconfig.json. tsconfig-paths will be skipped
PS D:\React\Next\google-file> npx cypress open

Couldn't find tsconfig.json. tsconfig-paths will be skipped
Terminate batch job (Y/N)? Y
PS D:\React\Next\google-file> npx cypress open

Couldn't find tsconfig.json. tsconfig-paths will be skipped
Terminate batch job (Y/N)? Y
PS D:\React\Next\google-file> npx cypress open

Couldn't find tsconfig.json. tsconfig-paths will be skipped
Terminate batch job (Y/N)? Y
PS D:\React\Next\google-file> npx cypress open

Couldn't find tsconfig.json. tsconfig-paths will be skipped
Terminate batch job (Y/N)? Y
PS D:\React\Next\google-file> npx cypress open

Couldn't find tsconfig.json. tsconfig-paths will be skipped
GET /__/ 200 30.561 ms - -
GET /seed?osname=win&channel=stable&milestone=108 200 1978.334 ms - -
GET /__/ 304 1.089 ms - -
POST /extensions 200 1776.187 ms - -
POST /extensions 200 1771.951 ms - -
POST /extensions 200 1776.719 ms - -
POST /extensions 200 1781.361 ms - -
POST /extensions 200 1854.694 ms - -
POST /extensions 200 1865.278 ms - -
POST /extensions 200 1208.639 ms - -
POST / 200 801.163 ms - -
POST /extensions 200 737.313 ms - -
POST /extensions 200 735.621 ms - -
POST /extensions 200 734.957 ms - -
POST /extensions - - ms - -
Couldn't find tsconfig.json. tsconfig-paths will be skipped
Couldn't find tsconfig.json. tsconfig-paths will be skipped
Couldn't find tsconfig.json. tsconfig-paths will be skipped
GET /__/ 200 12.704 ms - -
GET /__/ 304 1.889 ms - -
GET /seed?osname=win&channel=stable&milestone=108 200 871.477 ms - -
GET /__/ 304 0.628 ms - -
POST /extensions 200 1424.300 ms - -
POST /extensions 200 1428.110 ms - -
POST /extensions 200 1432.813 ms - -
POST /extensions 200 1442.043 ms - -
POST /extensions 200 1448.042 ms - -
POST /extensions 200 1566.307 ms - -
GET /__/ 200 1.114 ms - -
GET /__/ 304 2.428 ms - -
GET /seed?osname=win&channel=stable&milestone=108 200 755.007 ms - -
- -
GET /__/ 304 1.078 ms - -
POST /extensions 200 1518.466 ms - -
POST /extensions 200 1533.226 ms - -
POST /extensions 200 1535.615 ms - -
POST /extensions 200 1537.961 ms - -
POST /extensions 200 1543.930 ms - -
POST /extensions 200 1546.189 ms - -
GET /__/ 200 0.837 ms - -
GET /__/ 304 1.256 ms - -
GET /seed?osname=win&channel=stable&milestone=108 200 756.897 ms - -
POST /extensions 200 733.067 ms - -
POST /extensions 200 736.924 ms - -
POST /extensions 200 735.143 ms - -
POST /extensions 200 735.486 ms - -
POST /extensions 200 734.115 ms - -
POST /extensions 200 735.898 ms - -
Couldn't find tsconfig.json. tsconfig-paths will be skipped
Couldn't find tsconfig.json. tsconfig-paths will be skipped
POST / 200 653.589 ms - -
POST /extensions 200 1543.294 ms - -
POST /extensions 200 731.446 ms - -
POST /extensions 200 732.528 ms - -
POST /extensions 200 731.207 ms - -
POST /extensions 200 733.324 ms - -
POST /extensions 200 737.399 ms - -
Couldn't find tsconfig.json. tsconfig-paths will be skipped
POST / 200 594.240 ms - -
GET /v4/threatListUpdates:fetch?$req=ChgKCGNocm9taXVtEgwxMDguMS40Ni4xNDQaDAgBEAEiBCABIAIoAxoMCAUQASIEIAEgAigBGgwIARABIgQgASACKAEaDAgDEAEiBCABIAIoARoMCAcQASIEIAEgAigBGgwIARAIIgQgASACKAQaDAgPEAEiBCABIAIoASICCAE=&$ct=application/x-protobuf&key=dummytoken 200 1518.897 ms - -
GET /__/ 304 1.164 ms - -
GET /__/ 304 0.900 ms - -

Other

may be version problem ? I disable version code because It has error. Now Brave is opened twice and cypress one is not working .

@lmiller1990 lmiller1990 self-assigned this Dec 26, 2022
@lmiller1990
Copy link
Contributor

I reproduced on windows. I'll see if linux suffers the same issue.

I also noticed const result = await execa(browserPath, ['--version']); doesn't work for Brave; it launches the browser immediately, when all you want is the version.

@lmiller1990
Copy link
Contributor

This seems to only happen on windows. On linux, I was able to add Brave and it did was it was suppose to. brave --version also causes the browser to launch on windows, instead of just returning the version, which isn't what you might expect.

@emilyrohrbough emilyrohrbough added E2E Issue related to end-to-end testing routed-to-e2e OS: windows and removed E2E-core labels Dec 28, 2022
@nagash77 nagash77 added Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. and removed routed-to-e2e labels Apr 19, 2023
@lmiller1990 lmiller1990 removed their assignment Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing OS: windows Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.
Projects
None yet
Development

No branches or pull requests

4 participants