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

使用快捷键上传图片,提示 You must be logged in to use 的错误 #147

Open
ruan-cat opened this issue Nov 22, 2023 · 0 comments

Comments

@ruan-cat
Copy link

Describe the bug

使用快捷键上传图片,提示 You must be logged in to use 的错误。

To Reproduce

  1. 在个人全局 settings.json 中添加以下的配置:
{
	"picgo": {
		// 默认为空,则表示使用VSCode的setting.json
		"path": ""
	},
	"picBed": {
		// 默认使用 SM.MS 图床
		"current": "smms",
		// 从 https://sm.ms/home/apitoken 获取的 token
		"smms": {
			"token": "mytoken",
			"backupDomain": "smms.app"
		}
	}
}
  1. 在 markdown 文件中插入图片。
  2. 报错。

Expected behavior

上述的配置已经足够上传图床了。期望代码不会出现错误。

Screenshots

20231122223737

System information

  • OS: Windows
  • Version Windows 10

VSCode information

  • Help -> About -> Copy

    版本: 1.83.1 (system setup)
    提交: f1b07bd25dfad64b0167beb15359ae573aecd2cc
    日期: 2023-10-10T23:48:05.904Z
    Electron: 25.8.4
    ElectronBuildId: 24154031
    Chromium: 114.0.5735.289
    Node.js: 18.15.0
    V8: 11.4.183.29-electron.0
    OS: Windows_NT x64 10.0.19045
  • vs-picgo version 2.1.6

  • Settings begin with picgo:

    {
    	"picgo": {
    		"path": ""
    	},
    	"picBed": {
    		"current": "smms",
    		"smms": {
    			"token": "mytoken",
    			"backupDomain": "smms.app"
    		}
    	}
    }

Additional context

Is this bug picBed specific, i.e. only the picBed you use is affected? Yes.

Is there any error in the console (Help -> Toggle Developer tools)?: Yes.

[PicGo ERROR]: Error: You must be logged in to use.
    at Object.handle (c:\Users\pc\.vscode\extensions\spades.vs-picgo-2.1.6\node_modules\picgo\dist\src\plugins\uploader\smms.js:51:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Lifecycle.doUpload (c:\Users\pc\.vscode\extensions\spades.vs-picgo-2.1.6\node_modules\picgo\dist\src\core\Lifecycle.js:80:1)
    at Lifecycle.start (c:\Users\pc\.vscode\extensions\spades.vs-picgo-2.1.6\node_modules\picgo\dist\src\core\Lifecycle.js:26:1)
    at PicGo.upload (c:\Users\pc\.vscode\extensions\spades.vs-picgo-2.1.6\node_modules\picgo\dist\src\core\PicGo.js:194:37)
    at async Promise.allSettled (index 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant