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

Access Denied: Linux precompiled binaries #1389

Closed
andrew-barnett opened this issue Oct 15, 2020 · 11 comments
Closed

Access Denied: Linux precompiled binaries #1389

andrew-barnett opened this issue Oct 15, 2020 · 11 comments

Comments

@andrew-barnett
Copy link

The URL https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz is returning an Access Denied error. (The v3 URL, https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v3-linux-x64.tar.gz, is fine.)

$ git clone https://github.com/mapbox/node-sqlite3.git
...
$ cd node-sqlite3/
$ npm install node-pre-gyp
...
$ ./node_modules/.bin/node-pre-gyp reveal
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | linux | x64
{
  "name": "sqlite3",
  "configuration": "Release",
  "module_name": "node_sqlite3",
  "version": "5.0.1",
  "prerelease": "",
  "build": "",
  "major": 5,
  "minor": 0,
  "patch": 1,
  "runtime": "node",
  "node_abi": "node-v72",
  "node_abi_napi": "napi",
  "napi_version": "6",
  "napi_build_version": 3,
  "node_napi_label": "napi-v3",
  "target": "",
  "platform": "linux",
  "target_platform": "linux",
  "arch": "x64",
  "target_arch": "x64",
  "libc": "glibc",
  "module_main": "./lib/sqlite3",
  "toolset": "",
  "host": "https://mapbox-node-binary.s3.amazonaws.com/",
  "module_path": "/usr/app/node-sqlite3/lib/binding/napi-v3-linux-x64",
  "module": "/usr/app/node-sqlite3/lib/binding/napi-v3-linux-x64/node_sqlite3.node",
  "remote_path": "./sqlite3/v5.0.1/",
  "package_name": "napi-v3-linux-x64.tar.gz",
  "staged_tarball": "build/stage/sqlite3/v5.0.1/napi-v3-linux-x64.tar.gz",
  "hosted_path": "https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/",
  "hosted_tarball": "https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v3-linux-x64.tar.gz"
}
{
  "name": "sqlite3",
  "configuration": "Release",
  "module_name": "node_sqlite3",
  "version": "5.0.1",
  "prerelease": "",
  "build": "",
  "major": 5,
  "minor": 0,
  "patch": 1,
  "runtime": "node",
  "node_abi": "node-v72",
  "node_abi_napi": "napi",
  "napi_version": "6",
  "napi_build_version": 6,
  "node_napi_label": "napi-v6",
  "target": "",
  "platform": "linux",
  "target_platform": "linux",
  "arch": "x64",
  "target_arch": "x64",
  "libc": "glibc",
  "module_main": "./lib/sqlite3",
  "toolset": "",
  "host": "https://mapbox-node-binary.s3.amazonaws.com/",
  "module_path": "/usr/app/node-sqlite3/lib/binding/napi-v6-linux-x64",
  "module": "/usr/app/node-sqlite3/lib/binding/napi-v6-linux-x64/node_sqlite3.node",
  "remote_path": "./sqlite3/v5.0.1/",
  "package_name": "napi-v6-linux-x64.tar.gz",
  "staged_tarball": "build/stage/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz",
  "hosted_path": "https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/",
  "hosted_tarball": "https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz"
}
node-pre-gyp info ok 
$ ./node_modules/.bin/node-pre-gyp reveal hosted_tarball --silent
https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v3-linux-x64.tar.gz
https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz
$ curl -s -L -o napi-v6-linux-x64.tar.gz https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz
$ cat napi-v6-linux-x64.tar.gz 
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>9A62407AA8EC561B</RequestId><HostId>XO6dyy/dS5Xks3WA3/cLZZDnJXRhUwkTeW0sqsyTVGuVAAty0fpJbF8M8U8G3UZAHn4lKmmMN1g=</HostId></Error>
@KatSick
Copy link

KatSick commented Oct 22, 2020

same for me here

@benhovinga
Copy link

benhovinga commented Jan 8, 2021

EDIT

I found that my errors below were related to my environment setup and not the subject issue. Disregard my comments.

For anyone using WSL, make sure your project is stored on the linux file system (~/project/...) and not on the windows file system (/mnt/c/...). This was my problem.


I am trying to get Strapi up and running with npx create-strapi-app fueld-api --quickstart and I get this error(gist).

Looking into the log I notice an HTTP 403 - Forbidden return on a download for https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, glibc) (falling back to source compile with node-gyp)

No idea if this is an issue with strapi, sqlite3, or gyp. However, because I see the failed download is a sqlite3 package I figured I would report the issue to this repo first.

My Environment:

  • Windows 10 (10.0.19041.685)
    • WSL 1
      • Ubuntu-18.04
        • NPM 6.14.4
        • Node 12.18.0

Edit
This error also occurred when running npm install sqlite3 in an empty project. (See log)

@nicolaiort
Copy link

Same over here installing sqlite3.
Package managers: npm, yarn and pnpm
Build envs:

  • Win 10 - NodeJS 14 and 15
  • Docker: node:alpine, node:latest and node:14.15.1-alpine3.12

Same 403 on the mapbox link while installing.

Only the relevant part:

node-pre-gyp info it worked if it ends with ok
--
34 | node-pre-gyp info using [email protected]
35 | node-pre-gyp info using [email protected] \| linux \| x64
36 | node-pre-gyp WARN Using request for node-pre-gyp https download
37 | node-pre-gyp info check checked for "/drone/src/node_modules/sqlite3/lib/binding/napi-v6-linux-x64/node_sqlite3.node" (not found)
38 | node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz
39 | node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz
40 | node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz
41 | node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v83 ABI, musl) (falling back to source compile with node-gyp)
42 | node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.1/napi-v6-linux-x64.tar.gz

@nicolaiort
Copy link

Little update:
Pinning sqlite3 to 5.0.0 in my package.json at least let's me work with that version of sqlite3 and doesn't break build any more.
Would still be nice to get this resolved :)

{
  "dependencies": {
    "sqlite3": "5.0.0"
  }
}

@elsiehupp
Copy link

I'm getting the same problem on Ubuntu x64 for sqlite3 v4.1.0:

https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.1.0/node-v83-linux-x64.tar.gz

Mentioned in: laurent22/joplin#4385

@ValeTheVioletMote
Copy link

ValeTheVioletMote commented Jan 22, 2021

Same problem here, both on Windows and Linux. Couldn't install 4.2.0. Then tried doing latest, also failed. Specifying to install @5.0.0 worked though.

@elsiehupp
Copy link

FWIW the error ultimately went away for me when I resolved npm install not working correctly (by wiping my cloned repository and doing a hard reset), so my guess here is that in at least some cases the real problem is node-pre-gyp generating an invalid URL, not a valid download being missing from the server.

@ozdeadmeat
Copy link

The downloads are giving an access denied error, until Mapbox fix this problem every install will need to be compiled, which is bloody annoying.

@MikeDimmickMnetics
Copy link

I think the Access Denied errors are really Not Found. Apparently AWS S3 will report 403 Access Denied if the (anonymous) user doesn't have ListBucket permission: https://jamesthom.as/2021/02/aws-s3-iam-errors-with-missing-files-404-expected-403-returned/

The files for Node-API v6 were not uploaded by the build for 5.0.1 - see #1444 and commit 60a022c, and also #1424 (comment). For now use version 5.0.2 or 5.0.0, which only support Node-API v3. According to the support matrix Node-API v3 is supported for all versions after Node 6.14.2. A later version of Node.js could drop support for older versions of Node-API, but at the time I wrote this, Node 16.x still supported Node-API v3.

If you really need version 5.0.1, you will need to have the build tools installed and configured for your platform, so that node-gyp can build the binaries from source.

@ozdeadmeat
Copy link

Or, you know, put the pre-compiled version somewhere people could get a hold of it. Downloading 4GB of compilers to compile this is just piss poor infrastructure management, not everyone wants to fuck around with compilers. Some of us just want easier access to the node.

@daniellockyer
Copy link
Member

Please try with v5.0.3 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants