Saving attachment failed in CNKI

Recently I got a lot of red cross when saving attachments. In debug output, the attachment URL link is valid. I can download the CAJ file when pasting the URL in the browser. This is part of the output from Zotero Connector

(4)(+0000003): Translate: Adding attachment

(5)(+0000002): HTTP/1.0 201 Created X-Zotero-Version: 5.0.94 X-Zotero-Connector-API-Version: 2 Content-Type: application/json {"items":[{"id":"XSQo4oKd","title":"时间序列数据挖掘中的若干问题研究","itemType":"thesis","attachments":[{"id":"QZ9PkoiS_1","title":"Full Text CAJ"}]}],"singleFile":false}

(3)(+0000001): Importing attachment from URL

(3)(+0000002): Importing attachment from URL https://kns.cnki.net/kcms/download.aspx?filename=TR3bQRzLNV3ZHRlVwd2VDdnUOdkQodGRIVXMtl0KykXNvgzQ1wkN2VEdmxUbWVldJVzN3MXSW5WaQVFeVp3brtSeOdXOBxUdqVTeWNjRENVaF92dCdVZLdGW2tWdrMVTyJGMoZmRKR0dV1kcvYVesNHVmljVNJjW&dflag=nhdown&dflag=cajdown&tablename=CMFD2008&uid=WEEvREcwSlJHSldSdmVqMVc3M1dFbEdsNWFVbDBRMlRMVDBKaVlZNTh3OD0=$9A4hF_YAuvQ5obgVAqNKPCYcEjKensW4ggI8Fm4gTkoUKaID8j8gFw!!

(3)(+0000001): HTTP HEAD https://kns.cnki.net/kcms/download.aspx?filename=TR3bQRzLNV3ZHRlVwd2VDdnUOdkQodGRIVXMtl0KykXNvgzQ1wkN2VEdmxUbWVldJVzN3MXSW5WaQVFeVp3brtSeOdXOBxUdqVTeWNjRENVaF92dCdVZLdGW2tWdrMVTyJGMoZmRKR0dV1kcvYVesNHVmljVNJjW&dflag=nhdown&dflag=cajdown&tablename=CMFD2008&uid=WEEvREcwSlJHSldSdmVqMVc3M1dFbEdsNWFVbDBRMlRMVDBKaVlZNTh3OD0=$9A4hF_YAuvQ5obgVAqNKPCYcEjKensW4ggI8Fm4gTkoUKaID8j8gFw!!

(5)(+0000010): CookieSandbox: Managing cookies for kns.cnki.net

(5)(+0000001): CookieSandbox: Added cookies for request to kns.cnki.net

(5)(+0000037): POST /connector/sessionProgress HTTP/1.1 Host: 127.0.0.1:23119 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0 Accept: */* Accept-Language: zh-CN,en-US;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Content-Type: application/json X-Zotero-Version: 5.0.77 X-Zotero-Connector-API-Version: 2 Content-Length: 24 Connection: keep-alive

(5)(+0000002): HTTP/1.0 200 OK X-Zotero-Version: 5.0.94 X-Zotero-Connector-API-Version: 2 Content-Type: application/json {"items":[{"id":"XSQo4oKd","title":"时间序列数据挖掘中的若干问题研究","itemType":"thesis","attachments":[{"id":"QZ9PkoiS_1","title":"Full Text CAJ","progress":0}]}],"done":false}

(5)(+0000090): CookieSandbox: Managing cookies for kns.cnki.net

(5)(+0000000): CookieSandbox: No Set-Cookie header received for kns.cnki.net

(3)(+0000001): HTTP HEAD https://kns.cnki.net/kcms/download.aspx?filename=TR3bQRzLNV3ZHRlVwd2VDdnUOdkQodGRIVXMtl0KykXNvgzQ1wkN2VEdmxUbWVldJVzN3MXSW5WaQVFeVp3brtSeOdXOBxUdqVTeWNjRENVaF92dCdVZLdGW2tWdrMVTyJGMoZmRKR0dV1kcvYVesNHVmljVNJjW&dflag=nhdown&dflag=cajdown&tablename=CMFD2008&uid=WEEvREcwSlJHSldSdmVqMVc3M1dFbEdsNWFVbDBRMlRMVDBKaVlZNTh3OD0=$9A4hF_YAuvQ5obgVAqNKPCYcEjKensW4ggI8Fm4gTkoUKaID8j8gFw!! succeeded with 404

(2)(+0000001): Attachment HEAD request returned with status code 404 in Zotero.MIME.getMIMETypeFromURL()

(3)(+0000005): Downloading file from https://kns.cnki.net/kcms/download.aspx?filename=TR3bQRzLNV3ZHRlVwd2VDdnUOdkQodGRIVXMtl0KykXNvgzQ1wkN2VEdmxUbWVldJVzN3MXSW5WaQVFeVp3brtSeOdXOBxUdqVTeWNjRENVaF92dCdVZLdGW2tWdrMVTyJGMoZmRKR0dV1kcvYVesNHVmljVNJjW&dflag=nhdown&dflag=cajdown&tablename=CMFD2008&uid=WEEvREcwSlJHSldSdmVqMVc3M1dFbEdsNWFVbDBRMlRMVDBKaVlZNTh3OD0=$9A4hF_YAuvQ5obgVAqNKPCYcEjKensW4ggI8Fm4gTkoUKaID8j8gFw!!

(5)(+0000004): CookieSandbox: Managing cookies for kns.cnki.net

(5)(+0000001): CookieSandbox: Added cookies for request to kns.cnki.net

(5)(+0000131): CookieSandbox: Managing cookies for kns.cnki.net

(5)(+0000001): CookieSandbox: No Set-Cookie header received for kns.cnki.net

(5)(+0000003): CookieSandbox: Managing cookies for kdoc.cnki.net

(5)(+0000001): CookieSandbox: Added cookies for request to kdoc.cnki.net

(5)(+0000421): CookieSandbox: Managing cookies for kdoc.cnki.net

(5)(+0000001): CookieSandbox: Slurped cookies from kdoc.cnki.net

(5)(+0000006): CookieSandbox: Managing cookies for kdoc.cnki.net

(5)(+0000000): CookieSandbox: Added cookies for request to kdoc.cnki.net

(3)(+0000117): Checking updated items for retractions

(5)(+0000118): CookieSandbox: Managing cookies for kdoc.cnki.net

(5)(+0000002): CookieSandbox: Slurped cookies from kdoc.cnki.net

(5)(+0000003): CookieSandbox: Managing cookies for caj.d.cnki.net

(5)(+0000001): CookieSandbox: Added cookies for request to caj.d.cnki.net

(5)(+0000115): POST /connector/sessionProgress HTTP/1.1 Host: 127.0.0.1:23119 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0 Accept: */* Accept-Language: zh-CN,en-US;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Content-Type: application/json X-Zotero-Version: 5.0.77 X-Zotero-Connector-API-Version: 2 Content-Length: 24 Connection: keep-alive

(5)(+0000002): HTTP/1.0 200 OK X-Zotero-Version: 5.0.94 X-Zotero-Connector-API-Version: 2 Content-Type: application/json {"items":[{"id":"XSQo4oKd","title":"时间序列数据挖掘中的若干问题研究","itemType":"thesis","attachments":[{"id":"QZ9PkoiS_1","title":"Full Text CAJ","progress":0}]}],"done":false}

(5)(+0000080): CookieSandbox: Managing cookies for caj.d.cnki.net

(5)(+0000001): CookieSandbox: Slurped cookies from caj.d.cnki.net

(2)(+0000428): Saving attachment failed

(2)(+0000001): Error: 'contentType' not provided Error: 'contentType' not provided Zotero.Attachments</this.createURLAttachmentFromTemporaryStorageDirectory@chrome://zotero/content/xpcom/attachments.js:538:37 Zotero.Attachments</this.importFromURL</externalHandlerImport<@chrome://zotero/content/xpcom/attachments.js:466:32 From previous event: saveItems@chrome://zotero/content/xpcom/translation/translate_item.js:250:30

(3)(+0000002): Updating items for connector save session QZ9PkoiS

(4)(+0000001): Tags haven't changed

(3)(+0000000): Collections have not changed for item 2500

(4)(+0000001): Item 2500 has not changed

(5)(+0000503): POST /connector/sessionProgress HTTP/1.1 Host: 127.0.0.1:23119 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0 Accept: */* Accept-Language: zh-CN,en-US;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate Content-Type: application/json X-Zotero-Version: 5.0.77 X-Zotero-Connector-API-Version: 2 Content-Length: 24 Connection: keep-alive

(5)(+0000002): HTTP/1.0 200 OK X-Zotero-Version: 5.0.94 X-Zotero-Connector-API-Version: 2 Content-Type: application/json {"items":[{"id":"XSQo4oKd","title":"时间序列数据挖掘中的若干问题研究","itemType":"thesis","attachments":[{"id":"QZ9PkoiS_1","title":"Full Text CAJ","progress":false}]}],"done":true}

It looks like "Error: 'contentType' not provided" causes the saving failure. Is there something wrong with Cookie?

Zotero Debug ID: D1192151662
Zotero Connector Debug ID is D1378963301.
Sign In or Register to comment.