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

Can't download the full svf #92

Closed
kioter1 opened this issue Jun 25, 2024 · 23 comments
Closed

Can't download the full svf #92

kioter1 opened this issue Jun 25, 2024 · 23 comments

Comments

@kioter1
Copy link

kioter1 commented Jun 25, 2024

Hi, when I download the svf packet, there is only one output.svf file downloaded, I can't find any other files. May I know what I should do?

@delundgren
Copy link

I'm having the same behavior:
image

and immediately after:
image

@STABLENG
Copy link

Same issue here - has there been any fixed implemented for this. We used to use an old version for this but it no longer works as it mentions the oauth being deprecated?

@STABLENG
Copy link

STABLENG commented Aug 6, 2024

this update has completely broken our workflow - does anyone have a solution for this? i haven't been able to find anything to get around it at present. We cannot download SVF assets following conversion. same issue as the images above (could not download asset) - all it outputs is an output.svf with no assets.

@petrbroz
Copy link
Owner

petrbroz commented Aug 6, 2024

Thanks for the heads up. Looks like the svf file itself is still downloaded and parsed successfully but something is affecting the subsequent downloads of the referenced assets. Let me look into that.

@petrbroz
Copy link
Owner

petrbroz commented Aug 6, 2024

I've just tried downloading a couple of SVFs, and they all succeeded. I even tried re-translating the designs into SVF1 from scratch, but still could not reproduce the issue. Could you please provide more details? What file format is this happening for? What are the exact repro steps?

@STABLENG
Copy link

STABLENG commented Aug 6, 2024 via email

@petrbroz
Copy link
Owner

petrbroz commented Aug 6, 2024

Thanks for the details! Couple of notes:

  • please note that the download feature only works for SVF1, not SVF2
  • this doesn't seem to be related to authentication; whether it's downloading the svf file itself or one of its referenced assets, the code calls the same Model Derivative endpoint with the same authentication, and from your description it sounds like you are able to download the svf file
  • I've just noticed in the screenshot provided by @delundgren that they're actually attempting to download the SVF generated from a DWG file; what error exactly are you getting @STABLENG?

@STABLENG
Copy link

STABLENG commented Aug 6, 2024 via email

@petrbroz
Copy link
Owner

petrbroz commented Aug 6, 2024

I've just published a new version of the extension (2.7.0) that will output more debugging information into its own output channel. If you can still reproduce the issue as @delundgren (getting a "could not download asset" error), please check the log to see if there's any more details.

Screenshot 2024-08-06 at 13 13 39

@delundgren
Copy link

@petrbroz - I just updated the extension and attempted to download again. Here's the terminal logging:
image

@STABLENG
Copy link

STABLENG commented Aug 7, 2024 via email

@STABLENG
Copy link

STABLENG commented Aug 7, 2024

image

@petrbroz
Copy link
Owner

petrbroz commented Aug 7, 2024

Thanks guys. I've narrowed the issue down to the following piece of code in svf-utils:

https://github.com/petrbroz/svf-utils/blob/develop/src/svf/downloader.ts#L100-L112

By default, when there's missing files in the SVF, the downloader only reports this in the console instead of throwing an exception. This can be modified by setting the failOnMissingAssets property to true.

Since I still can't reproduce the issue locally, I've put together a quick Node.js script that will try and download the SVF with the failOnMissingAssets option set: https://gist.github.com/petrbroz/596879789976e7499a8b6400ae615e8d. Could you please try and download your SVFs with this script, and share the console logs?

@STABLENG
Copy link

STABLENG commented Aug 7, 2024 via email

@petrbroz
Copy link
Owner

petrbroz commented Aug 7, 2024

@STABLENG you can simply run the node download.js command in the terminal, and the logs will be output to the terminal as well.

Repository owner deleted a comment from STABLENG Aug 7, 2024
@petrbroz
Copy link
Owner

petrbroz commented Aug 7, 2024

Thank you @STABLENG. Btw I've deleted your last message as it contained sensitive information (an access token). Let me investigate the error logs, and I'll get back to you.

@petrbroz
Copy link
Owner

petrbroz commented Aug 7, 2024

Ok, so I've tested the urn and the access token you shared, and I was actually able to download the entire SVF using the same node.js script... are you perhaps behind some firewall that could be interfering with the outgoing requests? Could you try and run the script on another machine?

@STABLENG
Copy link

STABLENG commented Aug 7, 2024 via email

@delundgren
Copy link

Hi Petr,

Here's my result:

//failOnMissingAssets: true

PS C:\Users\dalel\source\repos\SVFDownloadTest> node download.js
info: 07-08-2024 04:24:28: Initializing resiliency config: ResiliencyConfiguration (TimeOutValue: 15000) RetryCount: 5) (BackoffInterval: 10) (CircuitBreakerInterval: 60000)
Downloading derivative dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6aW1hZ2luaXRfZGVtb19vdXRwdXRfYnVja2V0X2Q1ZGVjNTdjZTFhYzQ0OGI5ZjM1MzgyOWY0NGMxNzFkL0Jsb3hCYXNlLmlwdA
info: 07-08-2024 04:24:28: Entered into getManifest
info: 07-08-2024 04:24:28: getManifest Request completed successfully with status code: 200
Downloading viewable cc741996-e585-450b-bbd9-9997635b1b33
info: 07-08-2024 04:24:28: Entered into getDerivativeUrl
info: 07-08-2024 04:24:28: getDerivativeUrl Request completed successfully with status code: 200
info: 07-08-2024 04:24:29: Initializing resiliency config: ResiliencyConfiguration (TimeOutValue: 15000) RetryCount: 5) (BackoffInterval: 10) (CircuitBreakerInterval: 60000)
info: 07-08-2024 04:24:29: Entered into getManifest
info: 07-08-2024 04:24:30: getManifest Request completed successfully with status code: 200
info: 07-08-2024 04:24:30: Entered into getDerivativeUrl
info: 07-08-2024 04:24:30: getDerivativeUrl Request completed successfully with status code: 200
Downloading asset objects_attrs.json.gz
info: 07-08-2024 04:24:31: Entered into getDerivativeUrl
error: 07-08-2024 04:24:31: getDerivativeUrl Request failed with status : 500 and statusText : Internal Server Error and error message: undefined
ModelDerivativeApiError: getDerivativeUrl Request failed with status : 500 and error message: undefined
at DerivativesApi. (C:\Users\dalel\source\repos\SVFDownloadTest\node_modules@aps_sdk\model-derivative\dist\api\derivatives-api.js:189:27)
at Generator.throw ()
at rejected (C:\Users\dalel\source\repos\SVFDownloadTest\node_modules@aps_sdk\model-derivative\dist\api\derivatives-api.js:8:65)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
axiosError: AxiosError: Request failed with status code 500
at settle (C:\Users\dalel\source\repos\SVFDownloadTest\node_modules\axios\dist\node\axios.cjs:2015:12)
at IncomingMessage.handleStreamEnd (C:\Users\dalel\source\repos\SVFDownloadTest\node_modules\axios\dist\node\axios.cjs:3131:11)
at IncomingMessage.emit (node:events:530:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
at Axios.request (C:\Users\dalel\source\repos\SVFDownloadTest\node_modules\axios\dist\node\axios.cjs:4262:41)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecuteWrapper.invoke (C:\Users\dalel\source\repos\SVFDownloadTest\node_modules\cockatiel\dist\common\Executor.js:40:27)
at async TimeoutPolicy.execute (C:\Users\dalel\source\repos\SVFDownloadTest\node_modules\cockatiel\dist\TimeoutPolicy.js:69:20)
at async ExecuteWrapper.invoke (C:\Users\dalel\source\repos\SVFDownloadTest\node_modules\cockatiel\dist\common\Executor.js:40:27)
at async RetryPolicy.execute (C:\Users\dalel\source\repos\SVFDownloadTest\node_modules\cockatiel\dist\RetryPolicy.js:55:28)
at async ExecuteWrapper.invoke (C:\Users\dalel\source\repos\SVFDownloadTest\node_modules\cockatiel\dist\common\Executor.js:40:27)
at async CircuitBreakerPolicy.execute (C:\Users\dalel\source\repos\SVFDownloadTest\node_modules\cockatiel\dist\CircuitBreakerPolicy.js:142:32) {
code: 'ERR_BAD_RESPONSE',
config: {
transitional: [Object],
adapter: [Array],
transformRequest: [Array],
transformResponse: [Array],
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: [Object],
validateStatus: [Function: validateStatus],
headers: [Object [AxiosHeaders]],
method: 'get',
url: 'https://developer.api.autodesk.com//modelderivative/v2/designdata/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6aW1hZ2luaXRfZGVtb19vdXRwdXRfYnVja2V0X2Q1ZGVjNTdjZTFhYzQ0OGI5ZjM1MzgyOWY0NGMxNzFkL0Jsb3hCYXNlLmlwdA/manifest/urn%3Aadsk.viewing%3Afs.file%3AdXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6aW1hZ2luaXRfZGVtb19vdXRwdXRfYnVja2V0X2Q1ZGVjNTdjZTFhYzQ0OGI5ZjM1MzgyOWY0NGMxNzFkL0Jsb3hCYXNlLmlwdA%255Coutput%255C1%255Cobjects_attrs.json.gz/signedcookies',
data: undefined
},
request: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: true,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: true,
socket: [TLSSocket],
_header: 'GET //modelderivative/v2/designdata/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6aW1hZ2luaXRfZGVtb19vdXRwdXRfYnVja2V0X2Q1ZGVjNTdjZTFhYzQ0OGI5ZjM1MzgyOWY0NGMxNzFkL0Jsb3hCYXNlLmlwdA/manifest/urn%3Aadsk.viewing%3Afs.file%3AdXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6aW1hZ2luaXRfZGVtb19vdXRwdXRfYnVja2V0X2Q1ZGVjNTdjZTFhYzQ0OGI5ZjM1MzgyOWY0NGMxNzFkL0Jsb3hCYXNlLmlwdA%255Coutput%255C1%255Cobjects_attrs.json.gz/signedcookies HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'Authorization: Bearer XXXXXXXXXXXXXXXXXXX\r\n' +
'region: US\r\n' +
'User-Agent: axios/1.7.3\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: developer.api.autodesk.com\r\n' +
'Connection: keep-alive\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '//modelderivative/v2/designdata/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6aW1hZ2luaXRfZGVtb19vdXRwdXRfYnVja2V0X2Q1ZGVjNTdjZTFhYzQ0OGI5ZjM1MzgyOWY0NGMxNzFkL0Jsb3hCYXNlLmlwdA/manifest/urn%3Aadsk.viewing%3Afs.file%3AdXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6aW1hZ2luaXRfZGVtb19vdXRwdXRfYnVja2V0X2Q1ZGVjNTdjZTFhYzQ0OGI5ZjM1MzgyOWY0NGMxNzFkL0Jsb3hCYXNlLmlwdA%255Coutput%255C1%255Cobjects_attrs.json.gz/signedcookies',
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: true,
host: 'developer.api.autodesk.com',
protocol: 'https:',
_redirectable: [Writable],
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 16384,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null
},
response: {
status: 500,
statusText: 'Internal Server Error',
headers: [Object [AxiosHeaders]],
config: [Object],
request: [ClientRequest],
data: ''
}
}
}

@STABLENG
Copy link

Hi Petr,

A bit of an update. Whilst i couldn't get it to work on any windows computer i have (including trying on different networks) i did finally manage to get it to download my files on the mac version of Visual Studio Code without any issues.

Whilst its a good to have a solution for us to continue using the platform i am still not sure what has changed to block the downloads on our end? I have tried reinstalling VSCode, turning off firewall / windows defender etc. to no avail. I am not sure if something has changed in VS Code itself because as i mentioned this was working on an older version of the extension because i was having the same issue with this months ago. Just until just a few weeks ago it was working until the older version of the extension started listing as deprecated whilst trying to initiate the download which caused me to update.

Appreciate your help so far and not sure on the solution for Windows moving forward.

@petrbroz
Copy link
Owner

Hi guys,

@STABLENG you're right, it turned out to be an issue that only appeared on Windows systems.

A new version of the vscode extension (2.7.1) has just been released where this issue has been addressed. Please give it a try, and if the issue persists, let me know.

@delundgren
Copy link

@petrbroz I just tested the new version (on Windows) and it is working as expected. Thank you!

@STABLENG
Copy link

Hi guys,

@STABLENG you're right, it turned out to be an issue that only appeared on Windows systems.

A new version of the vscode extension (2.7.1) has just been released where this issue has been addressed. Please give it a try, and if the issue persists, let me know.

Thanks Petr,

Got around to testing and can confirm the Windows version is working great now. Thanks for getting this fixed!

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

4 participants