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

Engine returns timeout immediately #87

Open
yoh1496 opened this issue Jun 13, 2019 · 2 comments
Open

Engine returns timeout immediately #87

yoh1496 opened this issue Jun 13, 2019 · 2 comments

Comments

@yoh1496
Copy link
Contributor

yoh1496 commented Jun 13, 2019

The code below is executed correctly.

function(request) {
  var Context = org.mozilla.javascript.Context,
  currentContext = Context.getCurrentContext,
  rhinoVersion = currentContext.getImplementationVersion;

  return personium.createResponse(200, rhinoVersion );
};

var _ = require("underscore")._;
var personium = require('personium').personium;
var console = require('console').console;

And the engine returns Timeout , but it doesn't take as long as a few seconds.

Is this correct ?

@yoh1496
Copy link
Contributor Author

yoh1496 commented Jun 13, 2019

All of exception thrown while executing are caught and treated as Timeout.

@shimono
Copy link
Member

shimono commented Oct 11, 2019

Is this code really executed correctly returning rhino version ?
Or does it just return timeout error response?
I guess it just return error immediately, which is intended behavior.

This probably occurs because the script accesses internal java object, org.mozilla.javascript.Context.
Personium Engine is designed to be a sandboxed JS runtime, so this should return error response for that reason.

As you point out, the error message should not be "Timeout".

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