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

Report Cannot read property 'uri' of undefined #6

Closed
joy-yu opened this issue Feb 28, 2019 · 2 comments
Closed

Report Cannot read property 'uri' of undefined #6

joy-yu opened this issue Feb 28, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@joy-yu
Copy link

joy-yu commented Feb 28, 2019

TypeError: Cannot read property 'uri' of undefined at userDefinedFormatOptionsForDocument (/Users/apple/.vscode/extensions/vknabel.vscode-swiftformat-1.3.0/out/src/SwiftFormatEditProvider.js:15:36) at format (/Users/apple/.vscode/extensions/vknabel.vscode-swiftformat-1.3.0/out/src/SwiftFormatEditProvider.js:27:33) at SwiftFormatEditProvider.provideDocumentFormattingEdits (/Users/apple/.vscode/extensions/vknabel.vscode-swiftformat-1.3.0/out/src/SwiftFormatEditProvider.js:65:16) at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:543:107 at t.asPromise (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:50:385) at new Promise (<anonymous>) at Object.t.asPromise (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:50:353) at e.provideDocumentFormattingEdits (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:543:67) at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:558:542 at e._withAdapter (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:553:292) at e.$provideDocumentFormattingEdits (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:558:504) at t._doInvokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:644:118) at t._invokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:643:744) at t._receiveRequest (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:642:256) at t._receiveOneMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:641:155) at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:638:960 at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:38:994 at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:44:113) at a (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:170:213) at Socket.f._socketDataListener (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:170:434) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:279:12) at readableAddChunk (_stream_readable.js:264:11) at Socket.Readable.push (_stream_readable.js:219:10) at Pipe.onread (net.js:636:20)

@joy-yu
Copy link
Author

joy-yu commented Feb 28, 2019

It happened just when I create a new swift file in VScode and try to format it.
And it work normally in other case.

vknabel added a commit that referenced this issue Mar 1, 2019
@vknabel vknabel self-assigned this Mar 1, 2019
@vknabel vknabel added the bug Something isn't working label Mar 1, 2019
@vknabel
Copy link
Owner

vknabel commented Mar 1, 2019

Thanks for your bug report!
This should be fixed in 1.3.1.

If it's not feel free to reopen this issue. 👍

@vknabel vknabel closed this as completed Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants