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

Does not work with Portable Visual Studio Code #331

Closed
jwstevens-ii opened this issue May 26, 2017 · 29 comments
Closed

Does not work with Portable Visual Studio Code #331

jwstevens-ii opened this issue May 26, 2017 · 29 comments

Comments

@jwstevens-ii
Copy link

jwstevens-ii commented May 26, 2017

Visual Studio Code Version : 1.12.2
Code Settings Sync Version : 2.8.0
Operating System : Windows 10.0.14393
Occurs On: Upload / Download
Proxy Enabled: No
GIst Id: jwstevensii

Sync does not properly work when Launching Visual Studio Code with the below parameters

--user-data-dir=[Alternate folder here]
--extensionHomePath=[Alternate folder here]

@shanalikhan
Copy link
Owner

It doesnt support portable vs code now. We will see what can be done later on.

@shanalikhan
Copy link
Owner

shanalikhan commented Feb 4, 2018

@haoadoreorange
Copy link

Hi, any news for portable vscode ?

@gandalfsaxe
Copy link

@shanalikhan As far as I can see, you're pending for microsoft/vscode#2741 because you want to support the portable version in a safe manner instead of hard cording paths. This is reasonable, but how about just starting portable version support by hard coding? It may be a bit of maintenance, but it really sucks to manually copy paste settings across files right now. Besides, I can't see any reason it's worse with the portable version as the regular version? Both must be hard coded now?

There are slight differences, e.g. Windows uses data in the same folder level as Code.exe whereas macOS uses code-portable-data at the same level as Visual Studio Code.app. But surely this is identical to treating different OSs for the non-portable VSCode?

Btw I wouldn't mind maintaining any changes made to the portable paths at least for the macOS version until we hopefully get these at an API level.

@shanalikhan
Copy link
Owner

Yes you are right.
I am currently checking if visual studio code provide some sort of flag that shows user is running a portable mode than hard code path can be used for now.
But if they dont even provide some method to check the portable mode is running or standard then i have to dig into a longer route by viewing the standard paths for code variants ( standard, insiders ) for each OS ( windows, Mac, Ubuntu ) and then setting hard code path as above for portable mode

@gandalfsaxe
Copy link

Gotcha.

You could just introduce a "sync.isUsingPortable" setting that defaults to false for now. If set to true, then it use a different set of paths.

Let me know if I can be of any help. I use both Windows and macOS at the moment.

@shanalikhan
Copy link
Owner

Yes, if there will no other option then I would have to go manual setup to adding keys.

@gandalfsaxe
Copy link

I can't help but to notice that the issue in question has been open since February 2016, so I'd say we shouldn't hold our breath for that one. Better to have a less elegant, but working solution now.

As I said, let me know if I can help in any way.

@shanalikhan
Copy link
Owner

As I said, let me know if I can help in any way.

If you can help - It would be great If you can just PR fixing this - Will be released with v3.1

Let me know if you are willing, we can discuss it.

References:
microsoft/vscode#49306
vsicons PR for adding portable - vscode-icons/vscode-icons#1651

@gandalfsaxe
Copy link

Hmm may be a little over my head compared with the time I have at the moment. Sorry.

@mpearon
Copy link

mpearon commented Aug 20, 2018

Hey, @shanalikhan! Just checking in - is a temporary solution still on the radar?
Great work with Settings Sync. Not sure how the world survived without it.

@CyrilTaylor
Copy link

not work with Settings Sync(shan.code-settings-sync)

That's because the extension does not honor VSCODE_APPDATA environment variable, just ask them to implement support.

Check src/paths.js of vscode and src/environmentPath.ts of code-settings-sync for more details.

shanalikhan pushed a commit that referenced this issue Oct 11, 2018
@shanalikhan
Copy link
Owner

shanalikhan commented Oct 11, 2018

I have created a PR to support portable mode.
But it will only support the default portable mode directory structure mentioned by Visual Studio Code Team.

image

It only supports Windows and Linux.
I dont have Mac so at the moment, Settings Sync wont support Portable Mode over Mac. You guys can send PR to assist.

Will be released in a week.

@shanalikhan shanalikhan modified the milestones: Backlog, v3.2 Oct 11, 2018
shanalikhan pushed a commit that referenced this issue Oct 11, 2018
shanalikhan added a commit that referenced this issue Oct 17, 2018
* chore(package): update tslint-plugin-prettier to version 2.0.0

* Updated: German translation

* #641

* Add support for VSCodium

* Corrected the message to be displayed

* Add Japanese translation file

* be able to upload additional file

* be able to download additional files

* create new advanced setting to add Customized Sync file

* fix typo eslint => eslintrc

* Add Import Custom File to workspace option

* unify display message: Custom Sync File

* Test Directory

* =Adding HostName property. Get hostname using 'os.hostname()'

* =Need definition for supported OS's. Using strict match regex to get @sync pragmas. Should it support multiple spaces? Replacing settings.json content before writing file. Should be better removing lines instead of add comments? Replacing settings.json before upload to remove @sync ignore pragms.

* Added English message for OSNotSupported message while processing uploading content

* mocha and chai packages added as dev dependencies. Test script not working while compiling.

* Moving pragma functions to a separated file

* Added Pragma util static class. Support for host, env and os values in every orther. Remove whitespaces before upload. Alert user if OS value is not a valid OS.

* Added hostName property to CustomSettings

* Tests files added. Estructure test per feature.

* Added some documentation. hostName property on custom config.

* uncomment lines function. Uncomment all @sync settings before upload. Only insert comments if it doesn't match with matchine os or host or env. Uncomment line before write if it matched.

* Do replace ments one time per setting pragma. Test uncoment function. More redeable settings json for testing.

* Add SUPPORTED_OS and osTypeFromString to environmentPath.ts as requested. Get OS from OsType enum. Remove os.hostName()

* Check valid JSON before writting file. All the comments and trilling commas are removed. Must check this. If not valid OS is detected inform user. Added function to remove comments from text.

* Chatch exception during upload. Should it abort upload?

* Adding VS Code tests in typescript. Run test changing launch mode to "Launch Test". Remove javascript files.

* Environment - treat non-OSS instalations on Linux as XDG

* Improvements
#628 , #629

* minor grammatical fixes

* add fileService.test.ts

* Version Change

* #331

* #513

* Add webpack bundling (#676)

* Update issue templates

* add webpack bundling for faster startup

* no conflicts

* Revert "Add webpack bundling (#676)" (#679)

This reverts commit e68a243.

* Gist Object changed

* Update package.json

* v3.2 change log
@shanalikhan
Copy link
Owner

v3.2 is released with this feature. Let me know if there is any problem

@gandalfsaxe
Copy link

gandalfsaxe commented Oct 17, 2018

How is it closed if it doesn’t work on Mac? Do you want a separate issue for that?

Great work with the windows version btw 👍

@shanalikhan
Copy link
Owner

#684

PR is welcome for Mac.

@Ash258
Copy link

Ash258 commented Oct 17, 2018

Still seeing error using 3.2.0 and Windows 10 1803

[Extension Host] TypeError: Cannot read property 'token' of undefined
	at Commons.<anonymous> (C:\Scoop\persist\vscode-insiders\data\extensions\shan.code-settings-sync-3.2.0\out\src\commons.js:216:29)
	at Generator.next (<anonymous>)
	at fulfilled (C:\Scoop\persist\vscode-insiders\data\extensions\shan.code-settings-sync-3.2.0\out\src\commons.js:4:58)
	at <anonymous> (at Function.LogException (C:\Scoop\persist\vscode-insiders\data\extensions\shan.code-settings-sync-3.2.0\out\src\commons.js:28:21))
t.log @ console.ts:134
t._logExtensionHostMessage @ extensionHost.ts:437
(anonymous) @ extensionHost.ts:244
emitTwo @ events.js:126
emit @ events.js:214
emit @ internal/child_process.js:772
_combinedTickCallback @ internal/process/next_tick.js:141
_tickCallback @ internal/process/next_tick.js:180

notificationsAlerts.ts:40 Sync : Error Logged In Console (Help menu > Toggle Developer Tools).
t.onDidNotificationChange | @ | notificationsAlerts.ts:40
-- | -- | --
  | (anonymous) | @ | notificationsAlerts.ts:26
  | e.fire | @ | event.ts:145
  | t.notify | @ | notifications.ts:113
  | t.notify | @ | notificationService.ts:52
  | e._showMessage | @ | mainThreadMessageService.ts:83
  | e._showMessage | @ | mainThreadMessageService.ts:44
  | e.$showMessage | @ | mainThreadMessageService.ts:38
  | t._doInvokeHandler | @ | rpcProtocol.ts:439
  | t._invokeHandler | @ | rpcProtocol.ts:424
  | t._receiveRequest | @ | rpcProtocol.ts:341
  | t._receiveOneMessage | @ | rpcProtocol.ts:271
  | (anonymous) | @ | rpcProtocol.ts:146
  | e.fire | @ | event.ts:145
  | a | @ | ipc.net.ts:103
  | n._socketDataListener | @ | ipc.net.ts:132
  | emitOne | @ | events.js:116
  | emit | @ | events.js:211
  | addChunk | @ | _stream_readable.js:263
  | readableAddChunk | @ | _stream_readable.js:250
  | Readable.push | @ | _stream_readable.js:208
  | onread | @ | net.js:594
  • Version: 1.29.0-insider
  • Commit: 799bc78af597769a5dd5a6b002359ddae412b1be
  • Date: 2018-10-17T05:19:06.776Z
  • Electron: 2.0.11
  • Chrome: 61.0.3163.100
  • Node.js: 8.9.3
  • V8: 6.1.534.41
  • Architecture: x64

@OrangeDrangon
Copy link

I fixed this error by creating a sync.lock than installing the extension. Now it is not picking up on my extensions in the portable install though.

@OrangeDrangon
Copy link

This issue needs to be reopened @shanalikhan

@neapolis79
Copy link

same issue on my new laptop.
When upload settings i see extension added, but in the new pc i read "No extensions installed"

@amal-khailtash
Copy link

amal-khailtash commented Nov 20, 2018

Same problem and error on Windows 10 and VSCode:

Version: 1.29.1
Commit: bc24f98b5f70467bc689abf41cc5550ca637088e
Date: 2018-11-15T19:13:36.375Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

/C:/Tools/VSCode/resources/app/out/vs/workbench/workbench.main.js:294 [Extension Host] TypeError: Cannot read property 'token' of undefined
	at Commons.<anonymous> (C:\Tools\VSCode\data\extensions\shan.code-settings-sync-3.2.0\out\src\commons.js:216:29)
	at Generator.next (<anonymous>)
	at fulfilled (C:\Tools\VSCode\data\extensions\shan.code-settings-sync-3.2.0\out\src\commons.js:4:58)
	at <anonymous>

@tmeckel
Copy link

tmeckel commented Nov 22, 2018

Still doesn't work when --user-data-dir= ref to my comment at microsoft/vscode#49306

@shanalikhan
Copy link
Owner

Settings Sync now supports portable mode in Mac
v2.3.4 Released.

@OrangeDrangon
Copy link

@shanalikhan is this true on windows as well?

@shanalikhan
Copy link
Owner

Yes, try with auto upload / download turned off. Create new issue if there is any problem.

@gandalfsaxe
Copy link

@shanalikhan Awesome! 🎉 I haven't tested it thoroughly yet, but I've tried it out a little, and it seems to work. Thanks!

@strange-life
Copy link

@shanalikhan I installed vscode-portable with scoop and couldn't synchronize the complete extension list
image
image
Version: 1.30.1
If you are free, please help me to look at this problem. Thank you very much.

@haoadoreorange
Copy link

haoadoreorange commented Apr 25, 2019

@shanalikhan
Hello, I'm on vscode 1.33.1 portable.
Uploading is fine but I cannot download extensions, only settings files are downloaded.
There is no error throw, juts 0 extension added.

I also try upload then force download and got the same thing.

Can you look into this please ?

UPDATED: actually I got this error

"C:\Hao\Softwares\VSCode-win32-x64-1.33.1\bin/code" --install-extension ChakrounAnas.turbo-console-log Extension 'chakrounanas.turbo-console-log' not found. Make sure you use the full extension ID, including the publisher, eg: ms-vscode.csharp Failed Installing Extensions: ChakrounAnas.turbo-console-log

@shanalikhan
Copy link
Owner

@babyadoresorange please open new ticket with the details reproducing steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests