speedscope icon indicating copy to clipboard operation
speedscope copied to clipboard

Doesn't open browser in Windows

Open janpio opened this issue 5 years ago • 7 comments

C:\Projects\Fastlane\optimize_startup_time (master -> origin)
λ speedscope C:\Users\Jan\.cache\rbspy\records\rbspy-2018-09-27-Y7AYEI5ihd.speedscope.json
Creating temp file C:\Users\Jan\AppData\Local\Temp\speedscope-1538089620601-55152.js
Creating temp file C:\Users\Jan\AppData\Local\Temp\speedscope-1538089620601-55152.html
Opening file://C:\Users\Jan\AppData\Local\Temp\speedscope-1538089620601-55152.html in your default browser

Nothing happens.

Opening file://C:\Users\Jan\AppData\Local\Temp\speedscope-1538089620601-55152.html manually worked.

janpio avatar Sep 27 '18 23:09 janpio

Hi @janpio, thanks for reporting this! I've done verrry close to zero testing on windows, so this doesn't particularly surprise me :)

I'll try to find some time to investigate this on a Windows VM.

Out of curiousity, which shell are running speedscope in on Windows? Is this powershell or git bash or something else?

jlfwong avatar Sep 27 '18 23:09 jlfwong

Yeah, it didn't really surprise me as well, so no harm done ;) Easiest solution is probably to change the text on Windows that the user should open it manually.

I was using Cmder right now, that usually behaves a bite more like git bash or a macOS or Linux shell than Powershell or cmd.exe. But should work everywhere of course 🔫

janpio avatar Sep 27 '18 23:09 janpio

Changing the line cli.js:92:

  await opn(urlToOpen, {wait: false})

to wait: true solves the issue for me both in cmd and Powershell. I also notice that the 'opn' package has been renamed to 'open' and the old package has been deprecated. Using 'opn' or 'open' does not make any difference as far as I can tell.

spillerrec avatar Aug 24 '20 07:08 spillerrec

@spillerrec Oh sweet, thanks for figuring that out. I'd accept a PR to switch packages & patch the bug if you're interested!

jlfwong avatar Aug 24 '20 17:08 jlfwong

I have created a PR here: https://github.com/jlfwong/speedscope/pull/307 I haven't worked on Node projects before, so let me know if I managed to mess it up despite the small amount of changes.

spillerrec avatar Aug 28 '20 06:08 spillerrec

This should be fixed now on master thanks to @spillerrec, and will go out with the next release. No promises on when that's going to be, but hopefully sometime in the next week or two.

jlfwong avatar Sep 14 '20 20:09 jlfwong

This has now been released, so it should be fixed in [email protected].

jlfwong avatar Sep 30 '20 01:09 jlfwong