antony-jr / AppImageUpdater

AppImage Updater for Humans built with QML/C++ with Qt5 :heart:.
GNU Lesser General Public License v3.0
40 stars 6 forks source link

Cannot update from GitLab CI #11

Closed probonopd closed 6 years ago

probonopd commented 6 years ago
wget -c "https://github.com/antony-jr/AppImageUpdater/releases/download/continuous/AppImageUpdater-bcdadb8-x86_64.AppImage"
chmod +x AppImageUpdater-bcdadb8-x86_64.AppImage

# Get "old" AppImage
wget -c "https://gitlab.com/probono/QtQuickApp/-/jobs/73879740/artifacts/raw/QtQuickApp-x86_64.AppImage"

# Try to update it
./AppImageUpdater-bcdadb8-x86_64.AppImage ./QtQuickApp-x86_64.AppImage 
No protocol specified
QAIUpdateInformation::  "zsync|https://gitlab.com/probono/QtQuickApp/-/jobs/artifacts/master/raw/QtQuickApp-x86_64.AppImage.zsync?job=trusty"
AIUpdaterBridge:: zsyncURL :: QUrl("https://gitlab.com/probono/QtQuickApp/-/jobs/artifacts/master/raw/QtQuickApp-x86_64.AppImage.zsync?job=trusty")  ::  "./QtQuickApp-x86_64.AppImage"
AIUpdaterBridge::GOT:: zsync headers :: success!
AIUpdaterBridge:: your version of appimage is older::  "769ad296e9c0624e6e62583fede4c3e7e36b7494"
AIUpdaterBridge:: redirected url ::  QUrl("https://gitlab.com/probono/QtQuickApp/-/jobs/artifacts/master/raw/?job=trustyQtQuickApp-x86_64.AppImage")
QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.
AIUpdaterBridge:: new updates available ::  "3cf0c53ba08c31310cb0665cf4e7eb7243f86cc3"
AIUpdaterBridge:: got everything :: Updating
EOF from serverOther error? -1
AIUpdaterBridge:: zsync recieve failed :: "./QtQuickApp-x86_64.AppImage"

AIUpdaterBridge:: redirected url : is wrong.

probonopd commented 6 years ago

Similar issue: https://github.com/AppImage/AppImageUpdate/issues/94

probonopd commented 6 years ago

Ping @antony-jr this is very important for us. Would be great if you could look into it. Thanks!

antony-jr commented 6 years ago

@probonopd I'm currently solving the problem at its root(the library).

antony-jr commented 6 years ago

CC: @probonopd

AppImageUpdaterBridge can now use Gitlab as a generic zsync transport method , But the new code is still in the experimental stage but working good so far , Things that are staged in experimental will be available in a week or so after rigorous testing and refactoring. I'm also planning to make this a plugin.

These are the new features which will be available after the experimental code is merged with master,

EDIT: using zsync algorithm in parallel seems to be a overkill , The amount of resource needed to make it parallel is more and thus consumes more time. Therefore after a lot of trails , I decided that using the zsync algorithm in a single thread is always the fastest and reduces a lot of resource and complications. And also both multi-threaded and single thread versions run in same time.(This is due to the overuse of resource.)

antony-jr commented 6 years ago

Just found out that Gitlab cannot support range requests , Thus even if we can check for updates, Its not possible to do the update , https://gitlab.com/gitlab-com/support-forum/issues/3655 (Hope they fix this soon).

probonopd commented 6 years ago

Thanks @antony-jr. In this case, we could check whether a sever supports range requests and if it does not, download the whole thing.

antony-jr commented 6 years ago

@probonopd The library is fully rewritten in C++ and working great , To test out the new library , You can use an example program.

 $ git clone https://github.com/antony-jr/AppImageUpdaterBridge
 $ cd AppImageUpdaterBridge
 $ cd examples/SimpleUpdate
 $ mkdir build
 $ cd build
 $ qmake "CONFIG+=LOGGING_DISABLED" .. # Assuming you have qt installed
 $ make -j$(nproc) 
 $ wget -c "https://gitlab.com/probono/QtQuickApp/-/jobs/73879740/artifacts/raw/QtQuickApp-x86_64.AppImage"
 $ ./SimpleUpdate QtQuickApp-x86_64.AppImage
 $ # Test Out.

I will soon fix this program , Since the hardest work is done , All I have to do is connect some slots and change the UI.