kylon / Sharedown

Electron application to download Sharepoint videos (especially meant for students)
GNU General Public License v3.0
370 stars 41 forks source link

Network Error #2

Closed palmerj closed 3 years ago

palmerj commented 3 years ago

I add my URL, click Start download, then login in via SSO+MFA, and it seems to login ok, but once the chrome session ends and I go back to the main sharedown dialog I get "Network Error". There is nothing in the Logs to tell me why the error occurred.

error

Note, I'm on MacOS 11.4 using 1.0.3

kylon commented 3 years ago

yt-dlp or ffmpeg? have you tried with both?

palmerj commented 3 years ago

I have both installed on my Mac:

% yt-dlp --version
2021.06.23

 % ffmpeg -version
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
built with Apple clang version 12.0.5 (clang-1205.0.22.9)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.4_2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-avresample --enable-videotoolbox
libavutil      56. 70.100 / 56. 70.100
libavcodec     58.134.100 / 58.134.100
libavformat    58. 76.100 / 58. 76.100
libavdevice    58. 13.100 / 58. 13.100
libavfilter     7.110.100 /  7.110.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  9.100 /  5.  9.100
libswresample   3.  9.100 /  3.  9.100
libpostproc    55.  9.100 / 55.  9.100
kylon commented 3 years ago

I mean, do you get this error with both?

palmerj commented 3 years ago

How do you choose which one to use? That's not clear to me. I already had both installed, so I don't really want to uninstall one of them. Cheers

palmerj commented 3 years ago

Ok sorry I see it in the options. Trying now

palmerj commented 3 years ago

Ok. I've tried both options and still get a network error.

palmerj commented 3 years ago

@kylon any ideas?

kylon commented 3 years ago

sorry, busy with life

attached a version with more logs

set FFMPEG as downloader in settings start the download and wait for the error you should see a testlog.txt file

remove any sensible data and post it here

Sharedown-test.zip

mtae commented 3 years ago

So this is the error message that pops up image

and the logs have a url of the form

https://northcentralus1-mediap.svc.ms/transform/videomanifest?provider=spo&inputFormat=mp4&cs=fFNQTw&docid=&access_token=<some characters>
.<Lots of characters>.<some characters>&action=Access&part=Index&format=dash&useScf=True&pretranscode=0&transcodeahead=0

Which when accessed returned an error that the uri can't be null (presumably the docid)

kylon commented 3 years ago

can you see your docid in logs? (as variable or as value)

new test Sharedown-test.zip

s-bhagwat commented 3 years ago

Hello I was having the same error and I can't find docid in logs log output - _getFileName: docid:

kylon commented 3 years ago

@s-bhagwat see also resp data dump in log, you may not see docid word there but you should look for a variable that contains the docid

s-bhagwat commented 3 years ago

@kylon here is some data { "ID": "563", "PermMask": "0x1003008031001", "FSObjType": "0", "HTML_x0020_File_x0020_Type": "Media.Meeting", "UniqueId": "{AACACCF6-28D2-4657-B902-B96D020FD382}", "ProgId": "Media.Meeting", "NoExecute": "1", "ContentTypeId": "0x01010085D2E0551D9086498952A258B92E404D", }

kylon commented 3 years ago

thats the full object?

anything like {.spItemUrl}?

s-bhagwat commented 3 years ago

no, it was just a part of it
".spItemUrl": "https://collagenameoffice-my.sharepoint.com:443/_api/v2.0/drives/b!bqDrShpqBkahIdfHwvIOxJqJ3_fbZqJOv-MJezIPEgVr0ncgmuTPQoYBiNq5xnnJ/items/01444GO7PWZTFKVURIK5DLSAVZNUBA7U4C?version=Published",

should i have to give you collegename also ?

kylon commented 3 years ago

so the docid is there i dont need any user specific data

does the resp data start with {"something":"","Templates":{},"ListData":{?

sharedown test3.zip

run with the new test

are _makeVideoManifestFetchURL and _getFileName: url the same string?

also look for make url error: and post it here if any

s-bhagwat commented 3 years ago

does the resp data start with {"something":"","Templates":{},"ListData":{? yes

after runnig with new test are _makeVideoManifestFetchURL and _getFileName: url the same string? yes there is no make url error

kylon commented 3 years ago

sharedown-t4.zip

any make url error: error?

s-bhagwat commented 3 years ago

make url error: empty value

kylon commented 3 years ago

ah, i forgot to print the name

sorry, rerun sharedown-t5.zip

these are the variable names

url variable = resp data variable

'{.mediaBaseUrl}' = '.mediaBaseUrl'
'{.callerStack}' = '.callerStack'
'{.spItemUrl}' = 'CurrentFolderSpItemUrl'
'{.driveAccessToken}' = '.driveAccessToken'

look for the resp data variable in resp data, is it missing? if no, can you post the dump without your data?

s-bhagwat commented 3 years ago

it worked! video is downloading thanks!

kylon commented 3 years ago

Can you explain so that this issue can be fixed? What is the variable?

s-bhagwat commented 3 years ago

Which variable? Am I supposed to tell you my access token?

palmerj commented 3 years ago

sorry, busy with life

No probs at all. Me too!

remove any sensible data and post it here

Please find my log here. Note I used sharedown-t5.zip and it's still not downloading for me.

kylon commented 3 years ago

Please find my log here. Note I used sharedown-t5.zip and it's still not downloading for me.

Thanks, this helps a lot I ll take a look tomorrow

kylon commented 3 years ago

@palmerj this should work

sharedown-t6.zip

palmerj commented 3 years ago

Thank heaps, the download has started!

I'm noticing that the download is taking some time and only going at ~400kbps, plus many periods of no download activity at all, and I have much more bandwidth. Is this download somehow rate limited, or could it be speed up by downloading multiple chunks at once? Why are there periods of no download activity?

palmerj commented 3 years ago

Actually now the download has stalled at about 25%. I'm looking at network traffic and there is nothing coming from the node progress at all.

palmerj commented 3 years ago

Ok I restarted and it's worked - got 150mb mp4 file. Still slow to download. Maybe there is some sort of deadlock going on...

kylon commented 3 years ago

the stream is not as fast as a regular download, MS introduced some limits recently yt-dlp downloads multiple chunks at once, actually 5 if you get stuck too many times i think your only option is ffmpeg for that video, i am not sure if it is a yt-dlp issue or MS

anyway, if you confirm this issue has been solved, i ll release a new version to close this.

palmerj commented 3 years ago

Thanks. I retested with yt-dlp and it's much faster. I'm happy. Please release a new version.