-
Notifications
You must be signed in to change notification settings - Fork 120
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
addItemPart returning HTML #1074
Comments
I've got an update that this seems likely to be related to node 18 and its experimental native I imagine this hasn't been noticed much because of #1052 but could be due to other circumstances I'm not accounting for. |
@addy I think this is probably related to #1052 becuase we default to using global |
@addy I am attempting to replicate your issue. I am using the script that you posted: https://gist.github.com/addy/ba7ce5b69d3c2f3677021af213880510 ... Even if I use Node v16, I still get error ... is this the same issue you're reporting in this issue? |
@gavinr Sorry, I should have amended that after getting past the 400s, it's not 100% correct. https://gist.github.com/addy/2f1723e51724cf0ca05f0f5eae6e86a4 Should get you around the 400 -- basically just switching to synchronous file You will still run into the node 18 issue, where downgrading to node 16 should fix the entire workflow. |
I am following your new code using Node v16, and getting an error on the
Is this the same issue that you're reporting here? Replication StepsHere are my replication steps:
|
Describe the bug
When calling the
addItemPart
function from@esri/arcgis-rest-portal
, HTML is returned. If allowed to resort to its default response format of 'json' a JSON parsing issue will occur here:arcgis-rest-js/packages/arcgis-rest-request/src/request.ts
Line 431 in 805844b
Returned HTML is in the following format:
REST calls are made in what we believe is the correct order:
createItem
addItemPart
commit
We have
multipart
set totrue
as well asasync
set to true.We are using the
async
/await
syntax, rather than callback form (for what that's worth).We are using the
ArcGISIdentityManager
to perform authentication.A sample of the workflow looks like this: https://gist.github.com/addy/ba7ce5b69d3c2f3677021af213880510
It's worth noting that we are not using a custom Portal, so the base API URL for these functions is
https://arcgis.com/sharing/rest/content/users/{username}/items/{itemId}/<function>
.Reproduction
See the above Gist: https://gist.github.com/addy/ba7ce5b69d3c2f3677021af213880510
I can work on getting a Codepen set up tomorrow if needed. We are mostly wondering if we are missing something about Portal vs public accounts, or if the API has changed recently.
Logs
See above logs
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: