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

Download core 0.96.0 failed when update realm from 0.97.0 to 0.98.0 #3183

Closed
yoncise opened this issue Feb 6, 2016 · 14 comments
Closed

Download core 0.96.0 failed when update realm from 0.97.0 to 0.98.0 #3183

yoncise opened this issue Feb 6, 2016 · 14 comments
Labels

Comments

@yoncise
Copy link

yoncise commented Feb 6, 2016

Realm can not update properly, when I run pod update --verbose.

console prints

[!] /bin/bash -c 
set -e
sh build.sh cocoapods-setup

core is not a symlink. Deleting...
Downloading dependency: core 0.96.0
Downloading core failed:
curl: (56) SSLRead() return error -9806

I tried to download core via http://static.realm.io/downloads/core/realm-core-0.96.0.tar.bz

Chrome says

404 Not Found

Code: NoSuchKey
Message: The specified key does not exist.
Key: downloads/core/realm-core-0.96.0.tar.bz
RequestId: B8067B66AED8ABE8
HostId: QwFCFYrlp7iDvUlewILgPliNGIyN7krFqgDNHbHMBiX3Yooa0CL9IiwUQbMDu63G1xtCLARmKv0=
An Error Occurred While Attempting to Retrieve a Custom Error Document

Code: NoSuchKey
Message: The specified key does not exist.
Key: 404.html
@jpsim
Copy link
Contributor

jpsim commented Feb 9, 2016

@yoncise the URL you provided is incorrect. build.sh cocoapods-setup should be downloading core from http://static.realm.io/downloads/core/realm-core-0.96.0.tar.bz2 (note the '2' at the end). Are you perhaps located in China? If so, please see #2713.

@yoncise
Copy link
Author

yoncise commented Feb 9, 2016

Sorry for that I missed 2. I can download core from browser correctly now.
It's hard to tell whether pods is downloading core correctly even I added --verbose.
As @mickeyhub suggested in #2446,

Beacause of bad net env.
the prepare command Realm provide is sh build.sh cocoapod-setup, mainly code is download realm-core, download realm-core if $TMPDIR/core_bin/core-${REALM_CORE_VERSION}.tar.bz2 file not exists. so if you downloads always failed, you can download realm-core directly according to url provided by build.sh (shell script function download_core), and then backup it, when you need pod install realm, you can mv it to $TMPDIR/core_bin/core-${REALM_CORE_VERSION}.tar.bz2.

${REALM_CORE_VERSION} is core version , such as 0.92.1.1

I don't understand the text which I add bold style in the above quote.

So I will appreciated it if you tell me how to upgrade realm when I have downloaded realm-core-0.96.0.tar.bz2 from browser or other download tools. In other words, if I use pod update to update realm, how can I skip the process of downloading core when I have downloaded core.

@mrackwitz
Copy link
Contributor

It might help to install CURL via brew. Can you give that a try? Forget what I said, that's something else.

@jpsim
Copy link
Contributor

jpsim commented Feb 9, 2016

@yoncise those steps should not be necessary, since if your browser can download core, so should curl.

In any case, the manual steps you refer to are these:

curl https://static.realm.io/downloads/core/realm-core-0.96.0.tar.bz2 -O
mkdir $TMPDIR/core_bin
mv realm-core-0.96.0.tar.bz2 $TMPDIR/core_bin

Then Realm's build.sh script should pick up that file, even if you're offline when you install Realm.

@yoncise
Copy link
Author

yoncise commented Feb 9, 2016

Ok, got it. Thanks!

I have set up a proxy for my browser to pass GFW (Great Firewall of China) so I can download core from browser. Unfortunately, it seems that my proxy doesn't work for my terminal... Damn GFW.

Thanks again.

@LeeRHuang
Copy link

the same issue that i meet now,do you have solved it ?@yoncise

@yoncise
Copy link
Author

yoncise commented Feb 15, 2016

  1. You should download core via url first. I have uploaded it to BaiduYun for your convenience.

  2. Execute below commands

    mkdir $TMPDIR/core_bin
    mv realm-core-0.96.1.tar.bz2 $TMPDIR/core_bin/core-0.96.1.tar.bz2
    
  3. Now Realm will update as normal, when you run pod update --verbose

@jpsim
From build.sh

CORE_TAR="${TMP_DIR}/core-${REALM_CORE_VERSION}.tar.bz2"

mv realm-core-0.96.1.tar.bz2 $TMPDIR/core_bin should be changed to mv realm-core-0.96.1.tar.bz2 $TMPDIR/core_bin/core-0.96.1.tar.bz2 to let build.sh pick up downloaded core.

ps. The latest version is 0.96.1, you should change version code accordingly.

@yoncise
Copy link
Author

yoncise commented Feb 15, 2016

@jpsim
I find it that I can download core via http without any proxies, however, I can not update realm via pods which uses https protocol. curl echo error curl: (35) Server aborted the SSL handshake or something else about SSL continuously. It's weird.

@wang9262
Copy link

wang9262 commented Mar 9, 2016

Great,it saves me lots of time.Damn GFW

@chaiyixiao
Copy link

@yoncise Hi, I used the v0.96 core to update my cocoaPods, but now when I try to update Realm to the latest version (which I think is v0.98.4), I failed again. Could you tell me where to find the URL to download the core? Many thanks!

@yoncise
Copy link
Author

yoncise commented Mar 12, 2016

@chaiyixiao
From realm-cocoa/build.sh file, you can see this statement

: ${REALM_CORE_VERSION:=0.97.0} # set to "current" to always use the current build
local CORE_URL="https://static.realm.io/downloads/core/realm-core-${REALM_CORE_VERSION}.tar.bz2"

Note, you need use core version (which is 0.97.0 now) instead of realm version (which is 0.98.4 now), so, the download url of v0.98.4's core is https://static.realm.io/downloads/core/realm-core-0.97.0.tar.bz2

@chaiyixiao
Copy link

@yoncise Just noticed that I missed the CORE_VERSION. Thanks a lot!! 😁

@wang9262
Copy link

@chaiyixiao Here is the core download url : http://static.realm.io/downloads/core/realm-core-0.96.2.tar.bz2 of Realm version 0.98.3, just change the core version in the url when it updates.Suppose the current core version(not Realm pod version) is 0.97.0, just replace the 0.96.2 with 0.97.0.For more information,dive into realm-cocoa/build.sh

@xilin
Copy link

xilin commented Mar 23, 2016

Thanks for the solution. For the bad network in China I have to do it all the time.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants