Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
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

Occasional failure to copy #1

Open
adam3smith opened this issue Oct 9, 2019 · 4 comments

Comments

@adam3smith
Copy link

commented Oct 9, 2019

We've been using this with great success, but for pages with a relatively large number of annotations, there are often a number of failures, with no discernible pattern. The counter just stops and the web console shows "rejected" with "TypeError: "NetworkError when attempting to fetch resource." (I have included the full error in a comment). Right before that is a CORS warning
"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://hypothes.is/api/annotations. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)."
but it seems like that shouldn't matter given that other items do copy.

I'm guessing this might just be an API glitch? Would it be worthwhile just re-trying failed annotations? If not, could the tool display a more user-friendly error message?

@adam3smith

This comment has been minimized.

Copy link
Author

commented Oct 9, 2019

Full copy of the error message with redacted API Key

rejected 
{…}
​
headers: {…}
​​
Authorization: "Bearer [API Key]"
​​
"Content-Type": "application/json;charset=utf-8"
​​
<prototype>: {…}
​​​
__defineGetter__: function __defineGetter__()
​​​
__defineSetter__: function __defineSetter__()
​​​
__lookupGetter__: function __lookupGetter__()
​​​
__lookupSetter__: function __lookupSetter__()
​​​
__proto__: 
​​​
constructor: Object()
​​​​
assign: function assign()
​​​​
create: function create()
​​​​
defineProperties: function defineProperties()
​​​​
defineProperty: function defineProperty()
​​​​
entries: function entries()
​​​​
freeze: function freeze()
​​​​
fromEntries: function fromEntries()
​​​​
getOwnPropertyDescriptor: function getOwnPropertyDescriptor()
​​​​
getOwnPropertyDescriptors: function getOwnPropertyDescriptors()
​​​​
getOwnPropertyNames: function getOwnPropertyNames()
​​​​
getOwnPropertySymbols: function getOwnPropertySymbols()
​​​​
getPrototypeOf: function getPrototypeOf()
​​​​
is: function is()
​​​​
isExtensible: function isExtensible()
​​​​
isFrozen: function isFrozen()
​​​​
isSealed: function isSealed()
​​​​
keys: function keys()
​​​​
length: 1
​​​​
name: "Object"
​​​​
preventExtensions: function preventExtensions()
​​​​
prototype: Object { … }
​​​​
seal: function seal()
​​​​
setPrototypeOf: function setPrototypeOf()
​​​​
values: function values()
​​​​
<prototype>: function ()
​​​
hasOwnProperty: hasOwnProperty()
​​​​
length: 1
​​​​
name: "hasOwnProperty"
​​​​
<prototype>: function ()
​​​
isPrototypeOf: isPrototypeOf()
​​​​
length: 1
​​​​
name: "isPrototypeOf"
​​​​
<prototype>: function ()
​​​
propertyIsEnumerable: propertyIsEnumerable()
​​​​
length: 1
​​​​
name: "propertyIsEnumerable"
​​​​
<prototype>: function ()
​​​
toLocaleString: toLocaleString()
​​​​
length: 0
​​​​
name: "toLocaleString"
​​​​
<prototype>: function ()
​​​
toSource: toSource()
​​​​
length: 0
​​​​
name: "toSource"
​​​​
<prototype>: function ()
​​​
toString: toString()
​​​​
length: 0
​​​​
name: "toString"
​​​​
<prototype>: function ()
​​​
valueOf: valueOf()
​​​​
length: 0
​​​​
name: "valueOf"
​​​​
<prototype>: function ()
​​​
<get __proto__()>: function __proto__()
​​​
<set __proto__()>: function __proto__()
​
method: "post"
​
params: "{\"user\":\"qdr@hypothes.is\",\"uri\":\"https://qdr.syr.edu/atipaper/ideology-of-the-offensive\",\"tags\":[],\"text\":\"<a href=\\\"https://qdr.syr.edu/guidance/ati\\\">\\n<img src=\\\"https://qdr.syr.edu/drupal_data/public/ati_banner_long.png\\\" align=\\\"left\\\"/></a>\\n<br>\\n\\n**Source Excerpt (Source 3):** \\\"Чрезвычайно усложнившаяся вследствие балканских событий международно-политическая обстановка данного времени -- говорилось в постановлении -- требует безотлагательного осуществления некоторых мер по усилению боевой готовности нашей армии.\\\" (136)\\n\\n**Source Excerpt Translation (Source 3):** \\\"'The international political climate of the time,' the resolution said, 'enormously complex as a result of the events in the Balkans, requires immediate implementation of certain measures to enhance the combat readiness of our army.'\\\"\\n\\n**Data Sources:**<br>\\n**Source 1:** https://doi.org/10.5064/F6KW5CXS/3ON1YD <br>\\n**Source 2:** https://doi.org/10.5064/F6KW5CXS/0XYTZG <br>\\n**Source 3:** https://doi.org/10.5064/F6KW5CXS/SM6IT9\\n\\n**Full Citation (Source 1):** A. M. Zaionchkovskii, _Podgotovka Rossii k imperialisticheskoi voine_ (Moscow: Gosvoenizdat, 1926), pp. 297, 306. \\n\\n**Full Citation (Source 2):** A. A. Manikovskii, _Boevoe snabzhenie russkoi armii, 1914-1918_ (Moscow: Vysshii voennyi redaktsionnyi sovet, 1923), vol. III, pp. 7-8.\\n\\n**Full Citation (Source 3):** V. I. Bovykin, _Iz istorii vozniknoveniia pervoi mirovoi voiny: Otnosheniia Rossii i Frantsii v 1912-1914 gg._ (Moscow: Moskovskii Universitet, 1961), p. 136. \\n\",\"target\":[{\"source\":\"https://qdr.syr.edu/atipaper/ideology-of-the-offensive\",\"selector\":[{\"type\":\"FragmentSelector\",\"value\":\"content\",\"conformsTo\":\"https://tools.ietf.org/html/rfc3236\"},{\"type\":\"RangeSelector\",\"endOffset\":636,\"startOffset\":555,\"endContainer\":\"/div[1]/section[1]/div[1]/div[1]/div[1]/div[2]/article[1]/div[1]/div[1]/div[1]/p[31]\",\"startContainer\":\"/div[1]/section[1]/div[1]/div[1]/div[1]/div[2]/article[1]/div[1]/div[1]/div[1]/p[31]\"},{\"end\":27162,\"type\":\"TextPositionSelector\",\"start\":27081},{\"type\":\"TextQuoteSelector\",\"exact\":\"emergency appropriation to start redressing still critical shortages of matériel.\",\"prefix\":\"litary demanded and received an \",\"suffix\":\"49\\nThe development of offensive \"}]}],\"group\":\"2Nopp9mx\",\"permissions\":{\"read\":[\"group:2Nopp9mx\"],\"update\":[\"acct:qdr@hypothes.is\"],\"delete\":[\"acct:qdr@hypothes.is\"]},\"document\":{\"title\":[\"The Ideology of the Offensive: Military Decision Making and the Disasters of 1914 | Qualitative Data Repository\"]}}"
​
url: "https://hypothes.is/api/annotations"
​
<prototype>: Object { … }
 TypeError: "NetworkError when attempting to fetch resource." hlib.js:132
@judell

This comment has been minimized.

Copy link
Owner

commented Oct 10, 2019

If not, could the tool display a more user-friendly error message?

Yes, will do.

BTW, the purpose of this prototype is to elicit feedback on what the core capability should ultimately be. I'm all ears!

We'd also be interested to know more about the workflow that motivates all this copying.

@adam3smith

This comment has been minimized.

Copy link
Author

commented Oct 10, 2019

We're moving annotations from a private to a public group (and we want both groups to exist, so this isn't about converting the group).

@judell

This comment has been minimized.

Copy link
Owner

commented Oct 10, 2019

OK, that makes sense. The SciCrunch project does a similar kind of data release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.