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)
- 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
- Gun not working with next.js 14.0.4 HOT 9
- Gun reports all documents always not only changed ones
- Referencing nodes that hold only primitive values HOT 2
- [BUG] Error when importing 'gun/lib/time.js' in nodejs HOT 1
- Use trystero for webrtc (with bittorrent dht signalling) HOT 8
- [BUG] mapping values in gun.user does not work properly HOT 10
- Setup without build tools HOT 1
- Proposal: GUN URIs to universally reference data HOT 2
- Question: How to split and distribute work? HOT 1
- Question: webseed functionality? HOT 1
- Have AI gen some contributor docs, docstrings, comments HOT 13
- node-webcrypto-oss deprecated HOT 3
- [BUG] gun server / nodejs / ERROR: Radisk needs `store.put` interface with `(file, data, cb)`!
- Problems with Node.js Scripts for Push/Pull Operations HOT 1
- not working even in same computer between to tab
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.