It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Works perfectly. Ubuntu 18.04 LTS. Thanks

Some tips for beginners: Extract the tar file before going to the next step( cd lgogdownloader-3.4 ) manually. For the game downloading section all you need to replace is the gamename/field with the link on the search bar you get when you right click the game installer on the GOG website.
I'd like to report trouble using this program. I built it on FreeNAS/FreeBSD and when I try to run ./lgogdownloader --login it fails and wants me to try again. I run that with --curl-verbose and I get the output below. It tries again a few times.

---
Email:
Password:
* Trying 23.66.18.134...
* TCP_NODELAY set
* Connected to auth.gog.com (23.66.18.134) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /usr/local/share/certs/ca-root-nss.crt
CApath: none
* error:0B06A041:x509 certificate routines:build_chain:malloc failure
* Closing connection 0
---

Am I missing some package like certificates or something?
There is something funky going on with the Galaxy downloading I've noticed that lgogdownloader was crashing towards the end of installing a game so I built a version a few commits back to see if it was a specific commit then I noticed a bunch of these: "URL using bad/illegal format or missing URL" for the files that were making the current build crash.

So I've narrowed it down to commit ab84d6f82720b8ca24704dae08673d8741cfede6 that introduced the seg faulting when hitting those files that have the issue. Fortunately they all seem to be gog hash/info files so the only side effect is that due to the seg fault you don't get the redistributable files assuming game files never come after them.

This is one of the files that causes the 403:
https://www.gogdb.org/manifest/7337aab1caaea03d1d2bf5967e211284
avatar
Cusith: There is something funky going on with the Galaxy downloading I've noticed that lgogdownloader was crashing towards the end of installing a game so I built a version a few commits back to see if it was a specific commit then I noticed a bunch of these: "URL using bad/illegal format or missing URL" for the files that were making the current build crash.

So I've narrowed it down to commit ab84d6f82720b8ca24704dae08673d8741cfede6 that introduced the seg faulting when hitting those files that have the issue. Fortunately they all seem to be gog hash/info files so the only side effect is that due to the seg fault you don't get the redistributable files assuming game files never come after them.

This is one of the files that causes the 403:
https://www.gogdb.org/manifest/7337aab1caaea03d1d2bf5967e211284
I would be interested in backtrace from debug build to see where exactly it segfaults.

Build a debug build

mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make
then run the debug build with gdb

gdb -batch -ex "run" -ex "thread apply all bt" --args ./lgogdownloader --your --options --here
avatar
Sude: ...
#0 .//goggame-1986198971.hashdb
Thread 7 "lgogdownloader" received signal SIGSEGV, Segmentation fault./s ETA: 0s
[Switching to Thread 0x7ffff2de8700 (LWP 9664)]
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string (this=0x7ffff2de7450, __str=<error reading variable: Cannot access memory at address 0x8>) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:440
440 /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h: No such file or directory.

Thread 7 (Thread 0x7ffff2de8700 (LWP 9664)):
#0 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string (this=0x7ffff2de7450, __str=<error reading variable: Cannot access memory at address 0x8>) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:440
#1 0x000055555570bce2 in Downloader::processGalaxyDownloadQueue (install_path="./", conf=..., tid=@0x555556336f68: 0) at lgogdownloader/src/downloader.cpp:3708
#2 0x0000555555735205 in std::__invoke_impl<void, void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Config, unsigned int const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Config, unsigned int> (__f=@0x555556337500: 0x555555709d34 <Downloader::processGalaxyDownloadQueue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Config, unsigned int const&)>, __args#0=..., __args#1=..., __args#2=@0x555556336f68: 0) at /usr/include/c++/8.2.1/bits/invoke.h:60
#3 0x0000555555728d2c in std::__invoke<void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Config, unsigned int const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Config, unsigned int> (__fn=@0x555556337500: 0x555555709d34 <Downloader::processGalaxyDownloadQueue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Config, unsigned int const&)>, __args#0=..., __args#1=..., __args#2=@0x555556336f68: 0) at /usr/include/c++/8.2.1/bits/invoke.h:95
#4 0x0000555555763483 in std::thread::_Invoker<std::tuple<void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Config, unsigned int const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Config, unsigned int> >::_M_invoke<0ul, 1ul, 2ul, 3ul> (this=0x555556336f68) at /usr/include/c++/8.2.1/thread:244
#5 0x0000555555762ee5 in std::thread::_Invoker<std::tuple<void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Config, unsigned int const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Config, unsigned int> >::operator() (this=0x555556336f68) at /usr/include/c++/8.2.1/thread:253
#6 0x0000555555761910 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Config, unsigned int const&), std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, Config, unsigned int> > >::_M_run (this=0x555556336f60) at /usr/include/c++/8.2.1/thread:196
#7 0x00007ffff6875063 in std::execute_native_thread_routine (__p=0x555556336f60) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
#8 0x00007ffff6e38a9d in start_thread () from /usr/lib/libpthread.so.0
#9 0x00007ffff654fa43 in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7ffff2df4580 (LWP 9654)):
#0 0x00007ffff6e42850 in nanosleep () from /usr/lib/libpthread.so.0
#1 0x0000555555724731 in std::this_thread::sleep_for<long, std::ratio<1l, 1000l> > (__rtime=...) at /usr/include/c++/8.2.1/thread:379
#2 0x0000555555729028 in Downloader::printProgress<galaxyDepotItem> (this=0x7fffffffe270, download_queue=...) at lgogdownloader/src/downloader.cpp:2977
#3 0x00005555557097ed in Downloader::galaxyInstallGame (this=0x7fffffffe270, product_id="1599390867", build_index=0, iGalaxyArch=@0x55555580c7ac: 2) at lgogdownloader/src/downloader.cpp:3405
#4 0x00005555556a104f in main (argc=5, argv=0x7fffffffe658) at lgogdownloader/main.cpp:795
Post edited September 30, 2018 by Cusith
avatar
Cusith: ...
Is this from debug build?
Because it doesn't show the line numbers from source files like backtrace from debug build normally does.
avatar
Cusith: ...
avatar
Sude: Is this from debug build?
Because it doesn't show the line numbers from source files like backtrace from debug build normally does.
Updated
Sorry about that not overly familiar with debugging sadly. It was from a Debug build just one that was installed rather than in the build directory. I guess I expected it to build the source lines into the debug data.
avatar
Cusith: Updated
Sorry about that not overly familiar with debugging sadly. It was from a Debug build just one that was installed rather than in the build directory. I guess I expected it to build the source lines into the debug data.
avatar
Cusith: #1 0x000055555570bce2 in Downloader::processGalaxyDownloadQueue (install_path="./", conf=..., tid=@0x555556336f68: 0) at lgogdownloader/src/downloader.cpp:3708
So it was what I suspected. The downloader failed to find download urls and build a vector of them. We then try to access value from empty cdn url vector which causes segfault.

This patch should fix the segfault
https://sites.google.com/site/gogdownloader/galaxy_empty_cdn_urls.diff

Downloader should now skip those files. Does it still crash?
avatar
Sude: ...
We're all good now, no crash response is :
goggame-1986198971.hashdb: Empty JSON response (product: 1986198971, chunk #0: 386c276ff9ac38fe939d3c2b93fda421)
goggame-1986198971.hashdb: Chunk failure, skipping file
Post edited September 30, 2018 by Cusith
avatar
Sude: ...
avatar
Cusith: We're all good now, no crash response is :
goggame-1986198971.hashdb: Empty JSON response (product: 1986198971, chunk #0: 386c276ff9ac38fe939d3c2b93fda421)
goggame-1986198971.hashdb: Chunk failure, skipping file
That's good. I've committed the fix to git.

8683fe0 Galaxy: Fix segfault when getting download url fails

avatar
J_Darnley: I'd like to report trouble using this program. I built it on FreeNAS/FreeBSD and when I try to run ./lgogdownloader --login it fails and wants me to try again. I run that with --curl-verbose and I get the output below. It tries again a few times.

---
Email:
Password:
* Trying 23.66.18.134...
* TCP_NODELAY set
* Connected to auth.gog.com (23.66.18.134) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /usr/local/share/certs/ca-root-nss.crt
CApath: none
* error:0B06A041:x509 certificate routines:build_chain:malloc failure
* Closing connection 0
---

Am I missing some package like certificates or something?
You could try using CA certificate bundle from curl to see if works.

wget https://curl.haxx.se/ca/cacert.pem
lgogdownloader --cacert ./cacert.pem --login
Post edited September 30, 2018 by Sude
Does lgogdownloader have any support for downloading movies and their extras?
How do you export cookies from your browser? I constantly keep getting hit by captchas and I don't know what to do, I use firefox btw.
Something just occurred to me, I use the automatic xml creation option for extras so that I can check the files are not corrupted. But how would I know if the online file, say, some_games_artwork.zip, hasn't been updated? If gog.com don't put a version number on it then there's nothing to compare to tell. Anything with a server side checksum is different of course.

Some of my extras files are years old, I'd be very surprised if none of them had been updated in that time.
Post edited November 23, 2018 by diziet_sma
avatar
diziet_sma: But how would I know if the online file, say, some_games_artwork.zip, hasn't been updated?
https://www.gogdb.org/changelog
https://www.gog.com/forum/general/the_what_did_just_update_thread
avatar
diziet_sma: But how would I know if the online file, say, some_games_artwork.zip, hasn't been updated?
avatar
kbnrylaec: https://www.gogdb.org/changelog
https://www.gog.com/forum/general/the_what_did_just_update_thread
Thanks for that, but what i was referring to was a programmatic way to tell. I'm not going to go through a couple of years or more worth of changelogs to see if any extras have changed:)
The main files are easy to check, just do a repair with lgogdownloader and new versions will be downloaded. Old versions can be deleted if wished with --check-orphans and a quick script The prog has '--updated' option now but as yet despite quite a few new versions of main files downloading, I have yet to see a result of using that option when checking beforehand.