pryv / open-pryv.io Goto Github PK
View Code? Open in Web Editor NEWOpen-source version of Pryv.io
Home Page: https://www.pryv.com/open-pryv/
License: Other
Open-source version of Pryv.io
Home Page: https://www.pryv.com/open-pryv/
License: Other
Hello all,
I am trying to dockerize an open-pryv.io to be able to deploy it on Windows machines (and Openshift later) but I am currently facing difficulties with the access to the server API.
Actually, when I run the image on my local machine :
docker run -p 3000:3000 open-pryv.io:v0.1, the container runs successfully.
I am able to connect to the container send requests and get responses:
~ $ docker exec -it be4dd3879d42 bash
root@be4dd3879d42:/open-pryv.io# wget 127.0.0.1:3000
--2020-06-25 14:30:50-- http://127.0.0.1:3000/
Connecting to 127.0.0.1:3000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 150 [application/json]
Saving to: 'index.html'
[...]
But outside the container, the same call fails (directly in Windows):
~ $ wget 127.0.0.1:3000
--2020-06-25 15:33:22-- http://127.0.0.1:3000/
Connecting to 127.0.0.1:3000... connected.
HTTP request sent, awaiting response... No data received.
Retrying.
I tried to access it in many ways (changing port, investing the exposing IP, changing client) but the result is always the same.
Would you have best practices to share about it ?
For information, I used the following Docker file content to build my image:
FROM node:12.13.1
RUN apt-get update
RUN apt-get -y install rsync
RUN npm install -g yarn
COPY . /open-pryv.io
WORKDIR /open-pryv.io
RUN npm install -g yarn
RUN yarn setup
RUN yarn release
RUN apt-get install nano
EXPOSE 3000
CMD ["yarn", "local"]
#CMD ["yarn", "pryv"]
Thanks in advance for your support and kind regards,
Sébastien
The rec.la certificates are expired in the Docker download link, as well as in the rec.la repo.
Do you have any mean of updating them? Or do you plan to publish some new ones?
Hello everyone.
I'm writing here, because there is issue with creation access with 'create-only' level. For others levels it works fine, but for 'create-only' I get next error:
{
'error': {
'id': 'invalid-parameters-format',
'message': "The parameters' format is invalid.",
'data': [
{
'code': 'ANY_OF_MISSING',
'params': [
],
'message': "Data does not match any schemas from 'anyOf'",
'path': '#/',
'schemaId': 'pryv.core.access-create',
'inner': [
{
'code': 'OBJECT_ADDITIONAL_PROPERTIES',
'params': [
[
'expireAfter'
]
],
'message': 'Additional properties not allowed: expireAfter',
'path': '#/'
},
{
'code': 'ONE_OF_MISSING',
'params': [
],
'message': "Data does not match any schemas from 'oneOf'",
'path': '#/permissions/0',
'inner': [
{
'code': 'ENUM_MISMATCH',
'params': [
'create-only'
],
'message': 'No enum match for: create-only',
'path': '#/permissions/0/level',
'schemaId': 'streamPermission'
},
{
'code': 'OBJECT_MISSING_REQUIRED_PROPERTY',
'params': [
'tag'
],
'message': 'Missing required property: tag',
'path': '#/permissions/0',
'schemaId': 'tagPermission'
}
]
},
{
'code': 'ENUM_MISMATCH',
'params': [
'app'
],
'message': 'No enum match for: app',
'path': '#/type'
}
]
}
]
},
'meta': {
'apiVersion': '1.4.23',
'serverTime': 1597152581.771,
'serial': '2019120401'
}
}
Please let me know how it can be fixed. Thanks.
When both username and email are registered, the email member is missing from the error explanation, only the username problem described.
{
"error":{
"id":"item-already-exists",
"message":"An user with username 'gabortest001' already exists",
"data":{
"username":"gabortest001"
}
},
"meta":{
"apiVersion":"1.6.2-2-open",
"serverTime":1607330501.756,
"serial":"t1607325000"
}
}
{
"error":{
"id":"item-already-exists",
"message":"An user with email \"[email protected]\" already exists",
"data":{
"email":"[email protected]"
}
},
"meta":{
"apiVersion":"1.6.2-2-open",
"serverTime":1607330390.87,
"serial":"t1607325000"
}
}
{
"error":{
"id":"item-already-exists",
"message":"An user with username \"gabortest001\" already exists",
"data":{
"username":"gabortest001"
}
},
"meta":{
"apiVersion":"1.6.2-2-open",
"serverTime":1607331212.625,
"serial":"t1607325000"
}
}
Probably it designed this way but because the data
property holds an object it may contain the email too, to indicate to all problems for the frontend.
What I expected in the data member (regardless of the message):
{
"error":{
"id":"item-already-exists",
"message":"An user with username 'gabortest001' already exists",
"data":{
"username":"gabortest001",
"email": "[email protected]"
}
},
"meta":{
"apiVersion":"1.6.2-2-open",
"serverTime":1607330501.756,
"serial":"t1607325000"
}
}
I'd like to use Pryv in kind of integration tests and therefore I need somehow to run each test in isolated scope, e.g under a transaction that I can start before and rollback after each test, or just an API endpoint that I can use to erase all data safely. Is it possible right now? Right now I see the following way only:
Connect to mongo DB directly and remove all collections via:
mongo [database] --eval "db.getCollectionNames().forEach(function(n){db[n].remove()});"
What would you recommend?
Hi there
In the case of POSTing an existing item (e.g. register a user) the server response 400
. It seems to be incorrect since by MDN:
...to be a client error (e.g., malformed request syntax,
invalid request message framing, or deceptive request routing).
In this scenario, the request is formed properly so definitely not a bad request. 409 conflict
maybe?
happens here:
open-pryv.io/components/errors/src/factory.js
Line 148 in 6c73846
Thanks,
The error (warning?) message is:
2022-09-21 13:24:44 [error]: [api-server:Application:error-middleware]: Unhandled API error (MongoError): Invalid command argument. Expected '4.4' or '4.2', found 4.0 in: { setFeatureCompatibilityVersion: "4.0", lsid: { id: UUID("209d35ce-6032-4158-99b9-0620426af71f") }, $db: "admin" }. See https://docs.mongodb.com/master/release-notes/4.4-compatibility/#feature-compatibility.
MongoError: Invalid command argument. Expected '4.4' or '4.2', found 4.0 in: { setFeatureCompatibilityVersion: "4.0", lsid: { id: UUID("209d35ce-6032-4158-99b9-0620426af71f") }, $db: "admin" }. See https://docs.mongodb.com/master/release-notes/4.4-compatibility/#feature-compatibility.
at MessageStream.messageHandler (/app/dist/node_modules/mongodb/lib/cmap/connection.js:299:20)
at MessageStream.emit (node:events:390:28)
at processIncomingData (/app/dist/node_modules/mongodb/lib/cmap/message_stream.js:144:12)
at MessageStream._write (/app/dist/node_modules/mongodb/lib/cmap/message_stream.js:42:5)
at writeOrBuffer (node:internal/streams/writable:389:12)
at _write (node:internal/streams/writable:330:10)
at MessageStream.Writable.write (node:internal/streams/writable:334:10)
at Socket.ondata (node:internal/streams/readable:754:22)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
}
The consequences are unclear though...
The error is there (this should probably not be hardcoded and go to the config, no?):
components/storage/src/Database.js:152: client.db('admin').command({ setFeatureCompatibilityVersion: "4.0" }, {}, callback);
Cheers,
Stéphane.
I'm using docker-compose based Pryv installation, and it would be great to have the ability to specify some configuration via environment variables instead of mounting the config file. E.g:
services:
open-pryv.io:
image: pryvio/open-pryv.io:latest
command: "yarn api"
container_name: "open-pryv.io"
environment:
DNSLESS_PUBLIC_URL: http://localhost:3000
AUTH_ADMIN_ACCESS_KEY: CHANGE_ME
AUTH_TRUSTED_APPS: "*@https://pryv.github.io, *@http://*localhost*"
DATABASE_HOST: open-pryv-mongo
DATABASE_PORT: 27017
DATABASE_NAME: pryv-node
ports:
- 3000:3000
depends_on:
- open-pryv-mongo
networks:
- app-network
Is it possible?
I encountered an error when trying to set up Pryv using FerretDB as the database. I followed the instructions here and encountered this error
2024-07-16 14:31:03 [error]: [api-server:serverRoot] MongoServerError: Received authentication for mechanism PLAIN which is not enabled MongoServerError: Received authentication for mechanism PLAIN which is not enabled
at Connection.onMessage (/Users/orlandokodjo/Downloads/PROFILA/demo/open-pryv.io-master/node_modules/mongodb/lib/cmap/connection.js:231:30)
at MessageStream.<anonymous> (/Users/orlandokodjo/Downloads/PROFILA/demo/open-pryv.io-master/node_modules/mongodb/lib/cmap/connection.js:61:60)
at MessageStream.emit (node:events:517:28)
at processIncomingData (/Users/orlandokodjo/Downloads/PROFILA/demo/open-pryv.io-master/node_modules/mongodb/lib/cmap/message_stream.js:125:16)
at MessageStream._write (/Users/orlandokodjo/Downloads/PROFILA/demo/open-pryv.io-master/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
at writeOrBuffer (node:internal/streams/writable:392:12)
at _write (node:internal/streams/writable:333:10)
at Writable.write (node:internal/streams/writable:337:10)
at Socket.ondata (node:internal/streams/readable:809:22)
at Socket.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:368:12)
at readableAddChunk (node:internal/streams/readable:341:9)
at Readable.push (node:internal/streams/readable:278:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
ok: 0,
code: 334,
codeName: 'MechanismUnavailable',
connectionGeneration: 0,
[Symbol(errorLabels)]: Set(2) { 'HandshakeError', 'ResetPool' }
}
Any help will be appreciated.
Orlando.
I downloaded latest docker archive to run pryv in a local environment, edited the dockerized-config.yml file as stated in the readme, but the open-pryv.io container fails to start and enters an infinite restart loop. The following error is displayed:
open-pryv.io | value: {
open-pryv.io | adminAccessKey: 'REPLACE_ME',
open-pryv.io | trustedApps: '*@https://pryv.github.io, *@https://*.rec.la*'
open-pryv.io | },
open-pryv.io | scope: 'base',
open-pryv.io | info: 'From file: ./config.json'
open-pryv.io | }
But the file was correctly modified and I set another value for adminAccessKey
.
Hello everybody!
Thanks for the open source initiative!
We tried to install Open Pryv on docker to test the plateform. Unfortunately we have a problem when we try to access the login page at http://pryv-address/www/assets/access
The form is displayed and it is possible to create an account. But when we click on "Login" we have an error.
The console says:
TypeError: "t.accessState is undefined"
e AccessStates.js:7
w runtime.js:62
_invoke runtime.js:296
e runtime.js:114
i asyncToGenerator.js:17
default asyncToGenerator.js:35
e _export.js:36
default asyncToGenerator.js:14
H login.js:9
s controller.js:21
w runtime.js:62
_invoke runtime.js:296
e runtime.js:114
i asyncToGenerator.js:17
default asyncToGenerator.js:35
e _export.js:36
default asyncToGenerator.js:14
e Authorization.vue:129
w runtime.js:62
_invoke runtime.js:296
e runtime.js:114
i asyncToGenerator.js:17
default asyncToGenerator.js:35
e _export.js:36
default asyncToGenerator.js:14
submit Authorization.vue:124
VueJS 4
click vuetify.js:1391
VueJS 3
AppError.js:37:12
value AppError.js:37
e AppError.js:33
s controller.js:26
w runtime.js:62
_invoke runtime.js:296
e runtime.js:114
i asyncToGenerator.js:17
i asyncToGenerator.js:30
Thank you in advance for any tip
We noticed that to initialize a socket.io connection, Open pryv.io accept the following format:
https://{hostname}/{username}?auth={token}&resource={username}
Instead of
https://{hostname}/{username}/{username}?auth={token}&resource={username}
as per the documentation
Pryv's team is working on a fix..
Hello there,
We are trying to upgrade from 1.7.1 to 1.9.0.
The result of the migration seems ok:
db.versions.find()
{
_id: '1.7.1',
initialInstall: 1708090032.24
}
{
_id: '1.7.5',
migrationStarted: 1708090032.247,
migrationCompleted: 1708090032.251
}
{
_id: '1.8.0',
migrationStarted: 1708090032.252,
migrationCompleted: 1708090033.201
}
{
_id: '1.9.0',
migrationStarted: 1708090033.202,
migrationCompleted: 1708090033.22
}
Now it looks like users are not available anymore.
For example:
Do you see what the problem could be? (the migrations to 1.9 clearly deletes the system/username events and seems to move them to an sqlite DB but those DBs seem empty in our case).
Is there an additional migration step for this version?
Thanks,
Stéphane.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.