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

Tessera throws 500 Internal Server Error for OPTIONS : /storeraw #1385

Open
riaz7se opened this issue Jan 14, 2022 · 4 comments
Open

Tessera throws 500 Internal Server Error for OPTIONS : /storeraw #1385

riaz7se opened this issue Jan 14, 2022 · 4 comments

Comments

@riaz7se
Copy link

riaz7se commented Jan 14, 2022

Web3js-quorum sending private transaction to quorum-7nodes throws 500-Internal Server Error

A request call sending transaction from browser running Reactjs with Web3js-quorum to quorum 7nodes example, using below code, throws 500 internal error in Tessera logs

const web3 = new Web3Quorum(new Web3("http://localhost:22000"), { privateUrl: "http://localhost:9081",}, true);
....
const bytecodeWithInitParam = contract
      .deploy({ data: bytecode, arguments: [<some_value>] })
      .encodeABI();

const tx = await web3.priv.generateAndSendRawTransaction({
          gasPrice: 0,
          gasLimit: 4300000,
          value: 0,
          data: bytecodeWithInitParam,
          from: signAcct,
          isPrivate: true,
          privateFrom: "<tm1.pub>",
          privateFor: ["<tm7.pub>"],
          nonce: txCount,
        });

Making below config changes to tessera also not worked

    {
      "app": "ThirdParty",
      "serverAddress": "http://localhost:9081/",
      "communicationType": "REST",
      "cors" : {
          "allowedMethods" : ["GET", "POST", "PUT", "DELETE", "OPTIONS", "HEAD"],
          "allowedOrigins" : ["http://localhost:3000/", "*"],
          "allowedHeaders" : ["content-type"],
          "allowCredentials" : true
      }

Request from browser to quorum node with url http://localhost:22000 is working with 200 response for preflight request, where as request to tessera with url http://localhost:9081, which gets appended with /storeraw gives cors issue in browser console and preflight request of type OPTIONS fails.

Below stacktrace can be seen in tessera logs.

2022-01-13 18:46:09.966 [qtp630669831-22] INFO  o.g.j.s.w.p.WadlModelProcessor$OptionsHandler - Enter Request : OPTIONS : /storeraw
2022-01-13 18:46:09.985 [qtp630669831-22] ERROR c.q.t.a.e.DefaultExceptionMapper - Error occurred: Unable to make protected javax.ws.rs.core.Response() accessible: module java.ws.rs does not "opens javax.ws.rs.core" to module jersey.server. Root cause: Unable to make protected javax.ws.rs.core.Response() accessible: module java.ws.rs does not "opens javax.ws.rs.core" to module jersey.server
2022-01-13 18:46:09.986 [qtp630669831-22] INFO  o.g.j.s.w.p.WadlModelProcessor$OptionsHandler - Exit Request : OPTIONS : /storeraw
2022-01-13 18:46:09.986 [qtp630669831-22] INFO  o.g.j.s.w.p.WadlModelProcessor$OptionsHandler - Response for storeraw : 500 Internal Server Error

Tried & was unsuccess in below scenarios:

@joshuafernandes
Copy link
Contributor

Any updates on this @macfarla - we've also got a problem with this on one of our products

@macfarla
Copy link
Contributor

@joshuafernandes have you got a scenario for us to reproduce with?

@joshuafernandes
Copy link
Contributor

Hi @macfarla we had a more involved setup than the one here with react - the snippets @riaz7se pretty much sums it up. I can walk you through our code next week if that works?

@riaz7se
Copy link
Author

riaz7se commented Apr 28, 2022

@joshuafernandes by any chance, if i can be part of your code walk through, i would like to be.

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

No branches or pull requests

3 participants