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

Change default value for COMMUTER_S3_ENDPOINT from empty string to null #299

Merged
merged 1 commit into from
Jul 14, 2020

Conversation

shoelsch
Copy link

I encountered the same issue as reported in #298.

I'm setting the following environment variables:

COMMUTER_S3_KEY=<key>
COMMUTER_S3_SECRET=<secret>
COMMUTER_BUCKET=<bucket>
COMMUTER_STORAGE_BACKEND=s3

I independently tested that I have List and Get permissions on the bucket in question using awscli.

Below is the full stack trace that I receive when accessing /view. What stood out is the empty string that comes after the <bucket>.. As soon as I changed the default from "" to null as per @elvinx's suggestion, it worked for me!

getaddrinfo ENOTFOUND <bucket>.
[Error [AjaxError]: ajax error 500] { 
  xhr: { 
    UNSENT: 0, 
    OPENED: 1, 
    HEADERS_RECEIVED: 2, 
    LOADING: 3, 
    DONE: 4, 
    readyState: 4, 
    onreadystatechange: [Function: xhrReadyStateChange] { 
      subscriber: [AjaxSubscriber], 
      progressSubscriber: undefined, 
      request: [Object] 
    }, 
    responseText: '{"message":"getaddrinfo ENOTFOUND <bucket>.: ","reason":"NetworkingError"}', 
    responseXML: '', 
    status: 500, 
    statusText: null, 
    withCredentials: false, 
    open: [Function (anonymous)], 
    setDisableHeaderCheck: [Function (anonymous)], 
    setRequestHeader: [Function (anonymous)], 
    getResponseHeader: [Function (anonymous)], 
    getAllResponseHeaders: [Function (anonymous)], 
    getRequestHeader: [Function (anonymous)], 
    send: [Function (anonymous)], 
    handleError: [Function (anonymous)], 
    abort: [Function (anonymous)], 
    addEventListener: [Function (anonymous)], 
    removeEventListener: [Function (anonymous)], 
    dispatchEvent: [Function (anonymous)], 
    ontimeout: [Function: xhrTimeout] { 
      request: [Object], 
      subscriber: [AjaxSubscriber], 
      progressSubscriber: undefined 
    }, 
    onload: [Function: xhrLoad] { 
      subscriber: [AjaxSubscriber], 
      progressSubscriber: undefined, 
      request: [Object] 
    }, 
    timeout: 0, 
    responseType: 'json' 
  }, 
  request: { 
    async: true, 
    createXHR: [Function: createXHR], 
    crossDomain: true, 
    withCredentials: false, 
    headers: {}, 
    method: 'GET', 
    responseType: 'json', 
    timeout: 0, 
    url: 'http://127.0.0.1:4000/api/contents//', 
    body: undefined 
  }, 
  status: 500, 
  responseType: 'json', 
  response: { 
    message: 'getaddrinfo ENOTFOUND <bucket>.: ', 
    reason: 'NetworkingError' 
  } 
} 

Copy link
Member

@captainsafia captainsafia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Thanks for taking the time to submit this fix.

@captainsafia captainsafia merged commit 391a5d8 into nteract:master Jul 14, 2020
@shoelsch
Copy link
Author

Thanks for the fast review, @captainsafia! Any plans to release the new artifact to npm?

@captainsafia
Copy link
Member

@shoelsch v5.10.1 is released now.

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

Successfully merging this pull request may close these issues.

2 participants