adampresley/sublime-view-in-browser

"TypeError" when view in Chrome64

Opened this issue · 10 comments

Just installed to test this out, works fine in Firefox.

However with Chrome64 (not sure if will have same issue with 32bit) I get this in my console, and no page is opened in browser:

View In Browser plugin v2.0.0, Python 3
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 543, in run_
    return self.run(edit, **args)
  File "ViewInBrowserCommand in C:\Users\lee.hanbury.GINGERNUT\AppData\Roaming\Sublime Text 3\Installed Packages\View In Browser.sublime-package", line 198, in run
  File "ViewInBrowserCommand in C:\Users\lee.hanbury.GINGERNUT\AppData\Roaming\Sublime Text 3\Installed Packages\View In Browser.sublime-package", line 173, in loadPluginSettings
  File "ViewInBrowserCommand in C:\Users\lee.hanbury.GINGERNUT\AppData\Roaming\Sublime Text 3\Installed Packages\View In Browser.sublime-package", line 82, in getBaseCommand
  File "ViewInBrowserCommand in C:\Users\lee.hanbury.GINGERNUT\AppData\Roaming\Sublime Text 3\Installed Packages\View In Browser.sublime-package", line 68, in expandWindowsUserShellFolder
TypeError: expected bytes, bytearray or buffer compatible object

Any ideas of what would cause this, or how to resolve?

Not sure what it is. I am traveling now but will take a look at this early next week.

Exactly same problem, would be great if fixed.
Running Windows 8 64, Sublime text 3

chrome in either 32 or 64 bit doesn't matter (tested both). IE/Firefox work fine.

By any chance clintjansen, are you logging into a domain or PC account on a network on your system? I had a feeling it was because my path to chrome was C:\UserUsers\username.hostname\something something something \chrome.exe
Maybe having the username split with user.host is a bad idea?

Hmm no. running it on my own laptop as administrator. Also the path that's been set in the user/default settings is correct. If I copy paste it into windows explorer it will open chrome at instant.

I just tried this on my Win8.1 VM with Chrome installed to my Program Files (x86) directory and had no issue. But then I tried using just chrome and I get an error that looks like yours. Can you verify where Chrome is installed, what version, and what your default browser is set to in the View In Browser settings?

Hey I am also having the same issue and I am running Version 39.0.2171.95 m

I also changed my default browser in the "View in Browser" settings to chrome, along with the correct directory to the application. Thanks in advance.

Can you attach a snapshot of the error and your configuration files for the plugin please?

trouble shoot_view browser

Hope this helps, let me know if you need anything else.

My Chrome appears to be installed to:
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
So, really I am starting to think it's just looking in the wrong place.
I am using the default settings in View In Browser; I haven't touched anything.

{
    "posix": {
        "linux": {
            "firefox": "firefox -new-tab",
            "chrome": "google-chrome",
            "chrome64": "google-chrome",
            "chromium": "chromium"
        },
        "linux2": {
            "firefox": "firefox -new-tab",
            "chrome": "google-chrome",
            "chrome64": "google-chrome",
            "chromium": "chromium"
        },
        "darwin": {
            "firefox": "open -a \"/Applications/Firefox.app\"",
            "safari": "open -a \"/Applications/Safari.app\"",
            "chrome": "open -a \"/Applications/Google Chrome.app\"",
            "chrome64": "open -a \"/Applications/Google Chrome.app\""
        }
    },
    "nt": {
        "win32": {
            "firefox": "C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe -new-tab",
            "iexplore": "C:\\Program Files\\Internet Explorer\\iexplore.exe",
            "chrome": "%Local AppData%\\Google\\Chrome\\Application\\chrome.exe",
            "chrome64": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe"
        }
    },

    "browser": "firefox"
}

image

I've faced same error!
But when i checked for Chrome installation, i found its located in:
C:\Program Files\Google\Chrome\Application\chrome.exe

After overriding that path in user settings solved my problem.
Thanks.