Comments (8)
What are the names of the ENV variables? They have to be specific. Could you also maybe try passing the S3 opt with the explicitly referencing process.env
? See https://github.com/alexlafroscia/stickies/blob/master/server/app.js as an example.
Also, if you don't already know this... S3 can be fickle, you have to create the bucket before hand and you have to create an Access Control Policy for your token that allows it read/write to that bucket.
If you're not familiar with S3 let me know and I'll send you a sample.
from gun.
Using S3 regularly, so my env keys are fine. It turns out, I have to specify the region though.
$ aws s3 cp test.txt s3://foo-bar/test.txt
upload failed: [...] You are attempting to operate on a bucket in a region that requires Signature Version 4. You can fix this issue by explicitly providing the correct region location [...]
So I've specified the region and it wokrs like charm.
var gun = Gun({
s3: {
bucket: 'foo-bar', // my aws keys are set in env variables
region: 'eu-central-1'
}
});
Btw, thanks for the quick response.
ps: it would be nice if the S3 plugin could provide error details, if possible..
from gun.
Errors propagate back up through the plugins, for instance if:
gun.set({foo: 'bar'}, function(err){
if(err){ console.log(err) }
});
Fails at the S3 level, you'll get that error back in that callback.
from gun.
There is no callback in this case. Gun keeps trying to create the key..
https://github.com/amark/gun/blob/master/lib/s3.js#L76
from gun.
ooooh, yeah. That counts as a bug, because it should auto-retry up to an exponential retry limit where it finally does halt, and report the error. This needs to be fixed. Know any easy/simple inline exponential retry tricks?
from gun.
Here is a really simple exponential backoff algorithm: http://blog.johnryding.com/post/78544969349/how-to-reconnect-web-sockets-in-a-realtime-web-app
OR here is a more sopisthicated package: https://github.com/unshiftio/recovery
from gun.
I was interested implementing this, so came up with a simple solution, please find here: speier/bakeoff
from gun.
Thanks, the johnryding article is actually really nice and helpful. Nice bakeoff library, just starred it.
While, yes, this thread should be closed, a bug still remains on the infinite loop of S3 retries. Not very high on my priority list, but it is still on my mind.
You should chat with me in the https://gitter.im/amark/gun!
from gun.
Related Issues (20)
- [Docs] where is "Gun.chain" documented? HOT 2
- [Docs] are really difficult to use! HOT 4
- are there any recipies how to model data structures properly for Gun? HOT 1
- [Doc] user example is wrong? HOT 2
- [Doc] how can one find the root node of a given user? HOT 2
- [Doc] how can one write encrypted data? HOT 2
- [Doc] is the SEA Quickstart example wrong? HOT 3
- [RAD] I'm completely lost... HOT 9
- If you put data in a key with one gun instance, then change that data on another gun instance, the first instance will be unable to read the change HOT 5
- Unable to use Array.push inside once() HOT 1
- Loading sea.js with importScripts fails in worker HOT 6
- [Bug] _ev.off() disables the entire .map() listener, rather than the individual item HOT 1
- Silent Failure on Incorrect Certificate and Delayed put HOT 1
- How to deploy gun server by Docker? HOT 4
- [Question] Netx.js support? HOT 1
- Why is the source code so bad? HOT 2
- Can not access docs HOT 2
- load() issue HOT 2
- Gun integration with express not working HOT 3
- Once dosen't trigger most of the time, when messages are authenticated to an user. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gun.