Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 22 19:03
    dependabot[bot] labeled #461
  • Nov 22 19:03

    dependabot[bot] on npm_and_yarn

    Bump engine.io and karma Bumps… (compare)

  • Nov 22 19:03
    dependabot[bot] opened #461
  • Nov 11 13:55
    dependabot[bot] labeled #460
  • Nov 11 13:55

    dependabot[bot] on npm_and_yarn

    Bump loader-utils from 1.2.3 to… (compare)

  • Nov 11 13:55
    dependabot[bot] opened #460
  • Oct 29 10:33

    dependabot[bot] on npm_and_yarn

    (compare)

  • Oct 29 10:33
    dependabot[bot] closed #452
  • Oct 29 10:33
    dependabot[bot] commented #452
  • Oct 29 10:33
    dependabot[bot] labeled #459
  • Oct 29 10:33
    dependabot[bot] opened #459
  • Oct 29 10:33

    dependabot[bot] on npm_and_yarn

    Bump socket.io-parser and karma… (compare)

  • Oct 11 21:34
    dependabot[bot] labeled #458
  • Oct 11 21:34

    dependabot[bot] on npm_and_yarn

    Bump xmldom and jsonld Removes… (compare)

  • Oct 11 21:34
    dependabot[bot] opened #458
  • Oct 11 04:41
    roddolf closed #255
  • Oct 11 04:41
    roddolf closed #256
  • Oct 11 04:41
    roddolf closed #258
  • Aug 18 19:10
    inakijaneiro removed as member
  • Jul 21 04:58
    dependabot[bot] labeled #457
Miguel Aragón
@MiguelAraCo
There' s a bug in the SDK that is triggering this behavior
AlexSerrano22
@AlexSerrano22
cool, do you need that I post this on github?
Miguel Aragón
@MiguelAraCo
Well, the bug we found may not be causing your issue after all
In your code, the requests are being sent to //
Because of this: "/"+rootPath
AlexSerrano22
@AlexSerrano22
sorry this was my error when I sent you the code, currently, I only send the "/"
Miguel Aragón
@MiguelAraCo
:+1:
Can you open your developer tools and send us a screenshot of the requests being sent?
AlexSerrano22
@AlexSerrano22
sure, one moment
AlexSerrano22
@AlexSerrano22
ammm I thought about other things that I did yesterday, and another thing that I did was delete a document on the workbench and after that, I begin to see the error logs, and I understand that is because the parent document was "locked". probably this was the cause of the error. but how I can know if the parent document is locked, what happens if some request is sent to create a child in the same parent document? Will I re-send the request until the document can be created?
Miguel Aragón
@MiguelAraCo
Documents should only be locked while something is being done to them
So if you perform an action, that action finishes, and the document is still locked, there's an issue with the platform
Even then the lock expires after a few minutes
Right now there isn't a direct way to check if a document is locked other than trying something and receiving a 409
It is an internal mechanism after all
Normally you would program a retry mechanism with a configurable delay and a number of retries before failing
For now, you can remove any dead locks your platform may have by following these steps:
  • Shut down your platform: docker stop <container-name>
  • Delete the directory: <carbon-directory>/data/zookeeper
  • Start your platform again: docker start <container-name
Like I said, this shouldn't happen, so please let us know if a lock isn't being released and the steps you took to get there
AlexSerrano22
@AlexSerrano22
I think the platform works as designed because after a few minutes I was able to create a document, but thanks for clarifying me why I receive the 409 error. :)
Miguel Aragón
@MiguelAraCo
Nice :+1:
Thanks for reaching out :smile:
Miguel Aragón
@MiguelAraCo
Just published a new version v1.0.0-alpha.8 that fixes a minor bug. Please update your projects to use this version if you are using the alpha line
AlexSerrano22
@AlexSerrano22
cool, thanks
Alex Arriaga
@alex-arriaga
Hi, we are interested in migrating data from a previous Carbon LDP version; at this moment, we exported the data into JSON files and we are going to make some scripting to insert all that data in another Carbon instance…
Is that the right/shortest path?
We think the export/import process would not be compatible between legacy versions and the newest Alpha, right?
Miguel Aragón
@MiguelAraCo
Yes, the import/export mechanism we had on the previous version isn't compatible with the new one
There's no migration path yet
Manually importing/exporting it is the only approach as of now
Alex Arriaga
@alex-arriaga
Got it.
Alex Arriaga
@alex-arriaga
—> (deleted to place it in carbondlp channel instead)
Alex Arriaga
@alex-arriaga
Another question: I read somewhere Carbon LDP will provide some real time capabilities; is that still in development? Or can we use right away with the JavaScript SDK?
Alex Arriaga
@alex-arriaga
:ok_hand:
Miguel Aragón
@MiguelAraCo
My advise for users that have used previous versions of Carbon would be: read all the documentation again. A lot of things have changed
AlexSerrano22
@AlexSerrano22
Hi guy, I'm trying to create a project with a custom schema but I'm missing a dateTime value when the document is created on carbon, this is an example of my code:
carbonSchemas.PROJECT = {
    "forecastID": {
      "@id": "tms:forecastID",
      "@type": "string"
    },
    "name": {
      "@id": "https://schema.org/name",
      "@type": "string"
    },
    "updatedDate": {
      "@id": "tms:updatedDate",
      "@type": "dateTime"
    }
}
carbon.extendObjectSchema(`${CONTEXT_URL}#ForecastProject`, carbonSchemas.PROJECT);

let project = {
          "forecastID": "XXXXX",
          "color": "orange",
          "name": "someName",
          "updatedDate": "2018-01-17T04:14:54.150Z",
          "types": ["http://tms.base22.com/ns#ForecastProject"]
        }
carbon.documents.createChild("/projects/", project )...
Alex Arriaga
@alex-arriaga
Maybe the “updatedDate” needs to be an actual Date JavaScript object?
AlexSerrano22
@AlexSerrano22
ok let me try
Alex Arriaga
@alex-arriaga
let project = {
          "forecastID": "XXXXX",
          "color": "orange",
          "name": "someName",
          "updatedDate": new Date(),
          "types": ["http://tms.base22.com/ns#ForecastProject"]
        }
Rodolfo Aguirre
@roddolf
Yes, Alex Arriaga is right, the value needs to be a Date object
AlexSerrano22
@AlexSerrano22
cool, thanks @alex-arriaga and @roddolf
Alex Arriaga
@alex-arriaga
:ok_hand:
AlexSerrano22
@AlexSerrano22

Hello, I'm trying to add a type to a document but I'm receiving a 400 error code, Error: The attempt of parsing the request's body failed
this is the request response:

[{"@id":"_:node1c40v47nrx16996","@type":["https://carbonldp.com/ns/v1/platform#ErrorResponse"],"https://carbonldp.com/ns/v1/platform#error":[{"@id":"_:node1c40v47nrx16997"}],"https://carbonldp.com/ns/v1/platform#httpStatusCode":[{"@type":"http://www.w3.org/2001/XMLSchema#int","@value":"400"}],"https://carbonldp.com/ns/v1/platform#requestID":[{"@value":"32b1cdcc-5d3b-4901-9da2-e08b9eb58a60"}]},{"@id":"_:node1c40v47nrx16997","@type":["https://carbonldp.com/ns/v1/platform#Error"],"https://carbonldp.com/ns/v1/platform#errorCode":[{"@value":"0x6970"}],"https://carbonldp.com/ns/v1/platform#errorMessage":[{"@language":"es","@value":"The attempt of parsing the request's body failed"}],"https://carbonldp.com/ns/v1/platform#errorParameters":[{"@id":"_:node1c40v47nrx16998"}]},{"@id":"_:node1c40v47nrx16998","@type":["https://carbonldp.com/ns/v1/platform#Map"],"https://carbonldp.com/ns/v1/platform#entry":[{"@id":"_:node1c40v47nrx16999"},{"@id":"_:node1c40v47nrx17000"},{"@id":"_:node1c40v47nrx17001"}]},{"@id":"_:node1c40v47nrx16999","https://carbonldp.com/ns/v1/platform#key":[{"@value":"column"}],"https://carbonldp.com/ns/v1/platform#value":[{"@type":"http://www.w3.org/2001/XMLSchema#int","@value":"57"}]},{"@id":"_:node1c40v47nrx17000","https://carbonldp.com/ns/v1/platform#key":[{"@value":"parserErrorMessage"}],"https://carbonldp.com/ns/v1/platform#value":[{"@value":"Encountered \" <IRI> \"<http://tms.base22.com/ns#ForecastPerson> \"\" at line 1, column 57.\nWas expecting:\n    \":\" ...\n    "}]},{"@id":"_:node1c40v47nrx17001","https://carbonldp.com/ns/v1/platform#key":[{"@value":"line"}],"https://carbonldp.com/ns/v1/platform#value":[{"@type":"http://www.w3.org/2001/XMLSchema#int","@value":"1"}]}]

and this is my code:

carbon.documents.get("users/").then(( [ user, response ] ) => {
         user.addType("http://tms.base22.com/ns#ForecastPerson");
         return user.save();
      }).then(
        ( [ user, response ] ) => {
          console.log(user);
        }
      ).catch( console.error );

and my request payload is:
Add { <http://carbonldp.webtraining.zone:8083/users/> a <http://tms.base22.com/ns#ForecastPerson>. }.

I saw that the error is because the parser encountered <IRI>, my question is: can't I add a custom type? or which is the format for add a type with the function addType?

Miguel Aragón
@MiguelAraCo
Your code isn't wrong. It seems to be an issue with the platform. What platform version are you running?
AlexSerrano22
@AlexSerrano22
latest, 1.0.0-alpha.7
do you like that open an issue on github?
Miguel Aragón
@MiguelAraCo
AlexSerrano22
@AlexSerrano22
CarbonLDP/carbonldp-platform#7
Miguel Aragón
@MiguelAraCo
Thanks :+1: