PicGo / vs-picgo

A VSCode plugin of PicGo
https://marketplace.visualstudio.com/items?itemName=Spades.vs-picgo
MIT License
368 stars 50 forks source link

After Ctrl + Alt + U,All show "Uploading..." #34

Closed CatcherX closed 5 years ago

CatcherX commented 5 years ago

Version: 1.33.1 (user setup) Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8 Date: 2019-04-11T08:27:14.102Z Electron: 3.1.6 Chrome: 66.0.3359.181 Node.js: 10.2.0 V8: 6.6.346.32 OS: Windows_NT x64 6.1.7601

PicGo:2.0.3

Spades-S commented 5 years ago

@CatcherX Upload successfully when select sm.ms as the image hoisting service. Emmm.... maybe the network is very bad. Can you add more info, such as settings...

Kapture 2019-04-19 at 18 20 57

CatcherX commented 5 years ago

My network is normal. Uploading images from explorer is very fast.But uploading an image from clipboard is all show uploading, the log file not not recorded.

upupming commented 5 years ago

Please show your log in vscode. and seetings.json

upupming commented 5 years ago

@CatcherX Just a reminder, you can see your vscode console by click Help -> Toggle Developer Tools and you should see something like this:

image

You settings.json can be opened by File -> Preference -> Settings or Ctrl + ,.

Please copy error logged at the console and your setttings.json here.

@Spades-S We probably should update the issue template!

CatcherX commented 5 years ago

@CatcherX Just a reminder, you can see your vscode console by click Help -> Toggle Developer Tools and you should see something like this:

image

You settings.json can be opened by File -> Preference -> Settings or Ctrl + ,.

Please copy error logged at the console and your setttings.json here.

@Spades-S We probably should update the issue template!

ERR spawn powershell ENOENT: Error: spawn powershell ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19) at onErrorNT (internal/child_process.js:406:16) at process._tickCallback (internal/process/next_tick.js:63:19)

Molunerfinn commented 5 years ago

@CatcherX Open your cmd and write powershell, enter,take a screenshot.

Molunerfinn commented 5 years ago

It may be the same issue as this one, checkout if powershell is in your system PATH.

image

Spades-S commented 5 years ago

@CatcherX Just a reminder, you can see your vscode console by click Help -> Toggle Developer Tools and you should see something like this:

image

You settings.json can be opened by File -> Preference -> Settings or Ctrl + ,.

Please copy error logged at the console and your setttings.json here.

@Spades-S We probably should update the issue template!

Yeah, urgent!

CatcherX commented 5 years ago

It may be the same issue as this one, checkout if powershell is in your system PATH.

image

After put the powershell in system PATH,try again,show:

2019-4-19-19-28-25_11.jpg

CatcherX commented 5 years ago

{ "workbench.colorTheme": "Visual Studio Dark", "git.autofetch": true, "picgo.picBed.github.path": "/", "picgo.customUploadName": "${dateTime}_${fileName}${extName}", "picgo.configPath": "D:\PicGo\bed.json", "http.proxy": "" }

2019-4-19-19-33-31_config.jpg

Molunerfinn commented 5 years ago

What's your system path? take shot

CatcherX commented 5 years ago

2019-4-19-19-44-2_path.jpg C:\Users\Administrator\AppData\Local\Programs\Fiddler;C:\Users\Administrator\AppData\Roaming\npm;C:\Users\Administrator\AppData\Local\Programs\Microsoft VS Code\bin;C:\Windows\System32\WindowsPowerShell\v1.0\

Spades-S commented 5 years ago

@CatcherX The config path is WRONG! image The right is D:\\Picgo\\bed.json

CatcherX commented 5 years ago

2019-4-19-19-52-40_cccc.jpg

The right is D:\\Picgo\\bed.json

I am sorry.That is after escape,Actually, it's right.

Molunerfinn commented 5 years ago

If you are using Win7, you can just upload clipboard with image content, not the image file itself.

如果你在使用Win7,由于powershell版本的限制,你要上传剪贴板图片是有条件的。比如你不能复制一个「图片文件」然后上传,你只能复制「图片内容」,这样才能通过PicGo的剪贴板上传。什么叫「图片内容」?比如你用QQ截图,这个时候截图是以图片内容的形式存放在剪贴板里;你在网页上右键一张图片,选择「复制图片」的时候,是以图片内容的形式存放在剪贴板里。但是你要是在系统里右键一张图片文件,然后选择复制,这样是以「图片文件」的形式存放在剪贴板里的,PicGo在Win7的里是不支持这种形式上传的。

Molunerfinn commented 5 years ago

You can try this:

  1. reboot your PC
  2. open VSCode
  3. take a screenshot
  4. upload with vs-picgo by uploading with clipboard

Let's see what will happen

CatcherX commented 5 years ago

2019-4-19-20-9-30_888.jpg 2019-4-19-20-10-26_111.jpg

已经重启过计算机,这是截图,然后从剪切板粘贴(Ctrl+Alt+U), 在我的配置文件目录,能看到我截图的文件。

Molunerfinn commented 5 years ago

嗯大概知道是哪里的问题了。不过没有Win7的系统没有办法深入测试...

Molunerfinn commented 5 years ago

目前的问题大概是PicGo从剪贴板里通过Powershell生成了图片之后,powershell返回的图片路径为空,导致上传的时候传给PicGo的路径是'',就上传失败。

Molunerfinn commented 5 years ago

If you use vs-picgo's default config instead of yourself config file, what will happen

upupming commented 5 years ago

{ "workbench.colorTheme": "Visual Studio Dark", "git.autofetch": true, "picgo.picBed.github.path": "/", "picgo.customUploadName": "${dateTime}_${fileName}${extName}", "picgo.configPath": "D:\PicGo\bed.json", "http.proxy": "" }

2019-4-19-19-33-31_config.jpg

You are mixing the style of the configuration of v1.x and v2.0. Please delete all the picgo and picBed object, and only keep something like these is okay:

// ...
"picgo.configPath": "C:\\Users\\Doraeming\\AppData\\Roaming\\PicGo\\data.json",
"picgo.customUploadName": "${fileName}-${dateTime}",
"picgo.customOutputFormat": "<img src=\"${url}\" alt=\"${uploadedName}\">",
// ...

And also you can delete all the configuration of picgo, and it will be okay since vs-picgo will fall back to sm.ms default settings.

Molunerfinn commented 5 years ago

@CatcherX ctrl+alt+o is the upload from the input box, you should use ctrl+alt+u to upload the clipboard files!

image

CatcherX commented 5 years ago

@upupming @Molunerfinn 2.jpg 222.jpg 333333333.jpg

I'm trying again on another computer.Use the default settings. The mistake is still like this.

upupming commented 5 years ago

Thanks for the report, @Spades-S is investigating it now. We will try to fix it ASAP.

Molunerfinn commented 5 years ago

PicGo-Core v1.3.6 fix this bug

Spades-S commented 5 years ago

@CatcherX Fixed in vs-picgo 2.0.4. Please upgrade vs-picgo