Closed krrevilla closed 6 years ago
It looks like downloaded realm-sync-cocoa-3.0.0.tar.gz
failed silently, and it is not possible to unpack it. I see it sometimes on our CI system, and typically I just retry. We are using Amazon S3 to host our files, and the service is apparently not 100 % reliable.
Okay got it @kneth will try and try for now. Thanks
I am getting the same error with realm-sync-cocoa-2.2.9.tar.gz I tried to clean caches and reinstall several times now Any idea how to solve this?
Moving realm-sync-cocoa-2.2.9.tar.gz to /node_modules/realm/vendor/realm-ios didn`t work either
@rcalabro Sync 2.2.9 is from December 2017, and it is probably not work with master
of this repository. Realm JS depends heavily on Realm Sync and Realm Core so many changes to those two will be reflected in the code base. I suggest that you try to build directly from master
with recent versions of sync and core.
Tried it multiple times with various versions as well, can't get it to work. Debugging shows me that in download-realm.js
const corePath = desired.CORE_ARCHIVE && path.resolve(os.tmpdir(), desired.CORE_ARCHIVE);
is undefined
Updating Xcode was the only "solution"
Get Outlook for Android
On Fri, May 18, 2018 at 6:31 PM -0300, "Ekke Tõiv Uustalu" notifications@github.com wrote:
Tried it multiple times with various versions as well, can't get it to work. Debugging shows me that
const corePath = desired.CORE_ARCHIVE && path.resolve(os.tmpdir(), desired.CORE_ARCHIVE);
is undefined
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Lowering the version to 2.3.1 and clearing yarn caches worked for me.
@krrevilla Do you still experience it? Also after clearing your cache?
@kneth no, i don't experience it anymore. Somehow internet connection can also cause this issue.
@krrevilla Thanks. I close the issue. Never hesitate to ask another time.
This happened to us. As @ekeuus suggested, downgrading to 2.3.1 solved it.
@dwilt Which version did you try before downgrading?
@kneth It's happening to me with the latest version (2.12.0)
@dwilt I have tried to manually download the file, and it seems to be fine:
$ curl -O https://static.realm.io/downloads/sync/realm-sync-cocoa-3.7.0.tar.gz
$ tar tzf realm-sync-cocoa-3.7.0.tar.gz
Can you try the two command above to see if you get any error messages?
@kneth Maybe we're onto something here. Just tried the curl
:
To make sure it wasn't my internet:
Any ideas?
--http2
or --http1.1
to the curl command?@kneth I'm pretty sure I don't have a proxy server. I'd know that, right? You can't just have one of those without realizing it?
Both didn't work:
Yes, you will know if you are behind a proxy as it will require some configuration.
This is a bit bizarre. I mean, it works perfectly for me - and I am in Europe and our download server is in USA.
Is this what is happening during the build process? It's trying to redownload this tar file?
On Mon, Jul 9, 2018 at 1:59 PM Kenneth Geisshirt notifications@github.com wrote:
Yes, you will know if you are behind a proxy as it will require some configuration.
This is a bit bizarre. I mean, it works perfectly for me - and I am in Europe and our download server is in USA.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/realm/realm-js/issues/1774#issuecomment-403566970, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBCQxC3EacjeeVEI9J0Vx0vsClMqptlks5uE5oFgaJpZM4Twhdq .
It will download the file the first time.
Btw, does wget https://static.realm.io/downloads/sync/realm-sync-cocoa-3.7.0.tar.gz
work?
@kneth Had to download wget
via brew
but it worked:
I guess we can conclude that the problem is the download script (scripts/download-realm.js
) and not our server. The script is using node-fetch
, and curl
has the same issue.
What does that mean? Is there a way we can work around this in the mean time?
You can unpack the file in vendor/realm-mac-x64
and create an empty file download-realm.lock
(touch vendor/realm-mac-x64/download-realm.lock
).
And then I have to understand in which situations, node-fetch
doesn't work 😄
@kneth where is this vendor
folder at?
Are you talking about here: node_modules/realm/vendor
?
Yes, the one in your screenshot
@kneth I tried that and it still failed to build. Same exact error.
@kneth tried downgrading Xcode, moving over to the same node version as another guy on my team, and still nothing. I even tried creating a brand new react native project and just installed realm - same build error.
Maybe https://realm.io/docs/javascript/latest/#cannot-download-realm-sync-cocoa can help you.
@kneth those instructions aren't working for me either. I noticed that the latest package is 3.8.0 so I updated the script. I followed all of the steps to putt the files in the realm-ios
folder but they just get wiped every time a build runs. Isn't the download-realm.lock
file supposed to prevent it from trying to sync from the server? It says No lockfile found at the target, proceeding.
I just put one there though?
What I find really interesting, is that if I'm offline, it still tries to sync and then overwrites my folder. Our project is completely blocked by this. Any help (happy to do a screenshare here) would be great appreciated.
Also, fwiw, I can curl
now but the build still fails.
Reformatted my Mac. All is working now.
@dwilt you reformatted your MAC? :O WTF!!
Not able to download
https://static.realm.io/downloads/sync/realm-sync-cocoa-3.8.0.tar.gz Failed network error
Anyone can post this file in another source to test?
My issue is related with Wifi on OSX High Sierra. Trying to download with Windows PC, it's fine.
Now throws an error on iOS build
** BUILD FAILED **
The following commands produced analyzer issues:
Analyze Base/RCTModuleMethod.mm normal x86_64
(1 command with analyzer issues)
The following build commands failed:
CompileC /Users/joaom182/Projects/eipets/app/ios/build/Build/Intermediates.noindex/RealmReact.build/Debug-iphonesimulator/RealmReact.build/Objects-normal/x86_64/RealmReact.o RealmReact/RealmReact.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
@joaom182 haha yea, I tried everything else. Reformatting was the last option.
Oh my god! I have the same problem. I really can't imagine Reformatting is the only way!
@snokier I did not have to format, i have only to fix the issue with my Wi-fi on High Sierra.
I have been offline for a while (vacation), and it is interesting to read. MacOS has been having issues with WiFi but I thought it was over. @joaom182 Can you explain (I am just curious here) what your WiFi issue was?
@dwilt I admire that you go the extra mile (formatting your Mac) just to use Realm - thanks!
@kneth Instability, many packet loses, so the download never complete.
This resolved my issue: http://osxdaily.com/2016/09/22/fix-wi-fi-problems-macos-sierra/
I know this issue has been closed, but I just had the issue recently and found what was causing this.
Here is what happens to me, a corrupted file have been downloaded on the build server during a previous build, or a savagely aborted build, I can't really tell. But I was having the exact same error message as described above.
To find out what was going on, I decided to start logging every steps on the download-realm.js
file and found out that the download is not triggered if a file is already present on a temporary folder, was this one for me /var/folders/5v/lgs_9f8d6ms25pf_09y2xvfc0000gn/T/realm-sync-cocoa-2.2.10.tar.gz
Fixing the issue was then just about deleting this corrupted file and running the build again. This would explain the issue being resolved after a restart or even after a format as well as the issue encountered by some when on an unstable network.
Hope this can help someone.
I resolved this issue by getting a stronger network connection.
Result
Resolved requirements: { SYNC_SERVER_FOLDER: 'sync', SYNC_ARCHIVE: 'realm-sync-cocoa-3.0.0.tar.gz', SYNC_ARCHIVE_ROOT: 'core' } No lockfile found at the target, proceeding. Download url: https://static.realm.io/downloads/sync/realm-sync-cocoa-3.0.0.tar.gz Extracting realm-sync-cocoa-3.0.0.tar.gz => /Users/pong/Projects/infopais-mobile/node_modules/realm/vendor/realm-ios { Error: unexpected end of file at Zlib._handle.onerror (zlib.js:371:17) errno: -5, code: 'Z_BUF_ERROR' } Command /bin/sh failed with exit code 1
Steps to Reproduce
react-native init Test yarn add realm react-native link realm react-native run-ios
Version of Realm and Tooling
Issue is same with #1647, but after removing and installing after many times. Still getting error