ShareX / ShareX

ShareX is a free and open source program that lets you capture or record any area of your screen and share it with a single press of a key. It also allows uploading images, text or other types of files to many supported destinations you can choose from.
https://getsharex.com
GNU General Public License v3.0
27.98k stars 3.09k forks source link

上传时,总是提示上传失败,以下是错误内容和日志文件。重新绑定了onedrive也还是报错 #7419

Open fkuesou opened 2 weeks ago

fkuesou commented 2 weeks ago

System.ArgumentNullException: 值不能为 null。 参数名: value 在 Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) 在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) 在 ShareX.UploadersLib.FileUploaders.OneDrive.CreateShareableLink(String id, OneDriveLinkType linkType) 在 ShareX.UploadersLib.FileUploaders.OneDrive.Upload(Stream stream, String fileName) 在 ShareX.WorkerTask.UploadData(IGenericUploaderService service, Stream stream, String fileName) 在 ShareX.WorkerTask.DoUpload(Stream data, String fileName, Int32 retry)

Error message: 远程服务器返回错误: (400) 错误的请求。

Request URL: https://graph.microsoft.com/v1.0/me/drive/items/01ZQFXYYFZYVHCRHZ2HFBZ2XXHCGLYYQIC/createLink

Status code: (400) Bad Request

Headers: Transfer-Encoding: chunked Strict-Transport-Security: max-age=31536000 request-id: 5838d046-6928-461f-8261-86c332396343 client-request-id: 5838d046-6928-461f-8261-86c332396343 x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"Korea Central","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"SE1PEPF0000AA2D"}} Link: https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=v1.0,Removal&from=2021-09-01&to=2021-10-01;rel="deprecation";type="text/html",https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=v1.0,Removal&from=2021-09-01&to=2021-10-01;rel="deprecation";type="text/html" Deprecation: Fri, 03 Sep 2021 23:59:59 GMT Sunset: Sun, 01 Oct 2023 23:59:59 GMT Cache-Control: no-store, no-cache Content-Type: application/json Date: Tue, 30 Apr 2024 03:27:52 GMT

Response text: {"error":{"code":"notSupported","message":"You cannot break inheritance for this item because there are too many items with unique permissions in this list.","innerError":{"code":"uniqueScopesExceeded","date":"2024-04-30T03:27:52","request-id":"5838d046-6928-461f-8261-86c332396343","client-request-id":"5838d046-6928-461f-8261-86c332396343"}}}

Stack trace: 在 System.Net.HttpWebRequest.GetResponse() 在 ShareX.UploadersLib.Uploader.GetResponse(HttpMethod method, String url, Stream data, String contentType, Dictionary`2 args, NameValueCollection headers, CookieCollection cookies, Boolean allowNon2xxResponses)

System.ArgumentNullException: 值不能为 null。 参数名: value 在 Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) 在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) 在 ShareX.UploadersLib.FileUploaders.OneDrive.CreateShareableLink(String id, OneDriveLinkType linkType) 在 ShareX.UploadersLib.FileUploaders.OneDrive.Upload(Stream stream, String fileName) 在 ShareX.WorkerTask.UploadData(IGenericUploaderService service, Stream stream, String fileName) 在 ShareX.WorkerTask.DoUpload(Stream data, String fileName, Int32 retry)

Error message: 远程服务器返回错误: (400) 错误的请求。

Request URL: https://graph.microsoft.com/v1.0/me/drive/items/01ZQFXYYFZYVHCRHZ2HFBZ2XXHCGLYYQIC/createLink

Status code: (400) Bad Request

Headers: Transfer-Encoding: chunked Strict-Transport-Security: max-age=31536000 request-id: 57865e51-f978-431b-9c80-84a4da0681cf client-request-id: 57865e51-f978-431b-9c80-84a4da0681cf x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"Korea Central","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"SE1PEPF0000AA2D"}} Link: https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=v1.0,Removal&from=2021-09-01&to=2021-10-01;rel="deprecation";type="text/html",https://developer.microsoft-tst.com/en-us/graph/changes?$filterby=v1.0,Removal&from=2021-09-01&to=2021-10-01;rel="deprecation";type="text/html" Deprecation: Fri, 03 Sep 2021 23:59:59 GMT Sunset: Sun, 01 Oct 2023 23:59:59 GMT Cache-Control: no-store, no-cache Content-Type: application/json Date: Tue, 30 Apr 2024 03:27:56 GMT

Response text: {"error":{"code":"notSupported","message":"You cannot break inheritance for this item because there are too many items with unique permissions in this list.","innerError":{"code":"uniqueScopesExceeded","date":"2024-04-30T03:27:56","request-id":"57865e51-f978-431b-9c80-84a4da0681cf","client-request-id":"57865e51-f978-431b-9c80-84a4da0681cf"}}}

Stack trace: 在 System.Net.HttpWebRequest.GetResponse() 在 ShareX.UploadersLib.Uploader.GetResponse(HttpMethod method, String url, Stream data, String contentType, Dictionary`2 args, NameValueCollection headers, CookieCollection cookies, Boolean allowNon2xxResponses)

日志文件内容:

randomguyingithub commented 2 weeks ago

如果OneDrive文件夹内的文件(包括子文件夹)多于50,000个,OneDrive不会给分享链接并会提示这个错误 ("You cannot break inheritance for this item because there are too many items with unique permissions in this list") 检查一下文件夹内的文件是否过多