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

500 Server errors #6

Closed
3kh0 opened this issue Oct 25, 2023 · 4 comments
Closed

500 Server errors #6

3kh0 opened this issue Oct 25, 2023 · 4 comments

Comments

@3kh0
Copy link

3kh0 commented Oct 25, 2023

What I think got messed up is that I changed my Microsoft password this past week, and I found out that my Onedrive index started failing, here are the server logs

Edit: I also have tried to regenerate a Client secret and encrypt, then put it in the environment variables, but that did not work. Any help would be much appreciated.

image

ray],
      transformResponse: [Array],
      timeout: 0,
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      env: [Object],
      validateStatus: [Function: validateStatus],
      headers: [AxiosHeaders],
      method: 'post',
      url: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
      data: 'client_id=d198879a-48ba-408a-9e12-8991d8976f1f&redirect_uri=http%3A%2F%2Flocalhost&client_secret=umi8Q%7EPGCcHz1JZLUra.EVmxecq5yzzZffurlczC&refresh_token=M.C106_BAY.-CbPzMjtgZbX2ByJhkrj8Iw*TjD8RcJCMmeZN6kKN6ZRkGhqHNuWDuc7MO09R6zjjDZmPliwrIaYpxZ%21*69CsjdGDSvo5q3IlbSPQGBUagl%21BmFinh5xOOeB2zPa3vQVmsRZTv8po1b7fhYUziEP1nr8yocfs6hrjsSrsWp3x5dqO0ZrFAklAd9Sp5GUE3jRh2toLQjDTC0%21DpiPeEJ%21RaSopv8GqQED0zjS950McXU5q%21Zb1IwbDajCX0cGXa6YIV*fhHQDgwa9lgowtsqEvDaN67F5uS8sxJE8Fb%21FCBvsAMb8miWY1M9IjFQ5r6tBkip*CQ%21npN2LmF9pG4EHcVJDmpFG9SeL*V0LVBjhh7oXJrO8dG14nT7n7Q9HeQHBLDA%24%24&grant_type=refresh_token'
    },
    request: <ref *1> ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: '597',
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'POST /common/oauth2/v2.0/token HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Content-Type: application/x-www-form-urlencoded\r\n' +
        'User-Agent: axios/1.2.6\r\n' +
        'Content-Length: 597\r\n' +
        'Accept-Encoding: gzip, compress, deflate, br\r\n' +
        'x-vercel-id: iad1::jp2mr-1698271464992-71d4f661627a\r\n' +
        'Host: login.microsoftonline.com\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/common/oauth2/v2.0/token',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'login.microsoftonline.com',
      protocol: 'https:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    data: {
      error: 'invalid_grant',
      error_description: 'AADSTS70000: The user could not be authenticated as the grant is expired. The user must sign in again.\r\n' +
        'Trace ID: 6f4ebff6-9dd1-40e8-a65b-acddb00e7200\r\n' +
        'Correlation ID: 390ebff9-bd65-413a-a2b6-27ca6d8dc736\r\n' +
        'Timestamp: 2023-10-25 22:04:26Z',
      error_codes: [Array],
      timestamp: '2023-10-25 22:04:26Z',
      trace_id: '6f4ebff6-9dd1-40e8-a65b-acddb00e7200',
      correlation_id: '390ebff9-bd65-413a-a2b6-27ca6d8dc736',
      error_uri: 'https://login.microsoftonline.com/error?code=70000'
    }
  }
}
Error: Runtime exited with error: exit status 1
Runtime.ExitError
@iRedScarf
Copy link
Owner

I'm not quite sure why this happened, but it might be related to the change in your Microsoft account password, which may have affected the authentication status of the API or something.

I suggest you try redeploying and re-authenticating, which might resolve the issue.

@3kh0
Copy link
Author

3kh0 commented Oct 26, 2023

OK.

@3kh0 3kh0 closed this as completed Nov 3, 2023
@3kh0 3kh0 reopened this Nov 4, 2023
@3kh0
Copy link
Author

3kh0 commented Nov 4, 2023

I tried the following actions:

  • Redeploy, remove project and repo, readding it from step one
  • Deleting the app on Microsoft Azure and re-adding it
  • Deleting everything and starting from scratch

But to no avail

image

image

[Array],
      transformResponse: [Array],
      timeout: 0,
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      env: [Object],
      validateStatus: [Function: validateStatus],
      headers: [AxiosHeaders],
      method: 'post',
      url: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
      data: 'client_id=00de1844-70b1-4c58-bd9e-ee6df9eeff9a&redirect_uri=http%3A%2F%2Flocalhost&client_secret=5c48Q%7EQL32sNGzSbEliJBuDj9rcWQ5t1aU3P8dxB&refresh_token=M.C106_BAY.-CbPzMjtgZbX2ByJhkrj8Iw*TjD8RcJCMmeZN6kKN6ZRkGhqHNuWDuc7MO09R6zjjDZmPliwrIaYpxZ%21*69CsjdGDSvo5q3IlbSPQGBUagl%21BmFinh5xOOeB2zPa3vQVmsRZTv8po1b7fhYUziEP1nr8yocfs6hrjsSrsWp3x5dqO0ZrFAklAd9Sp5GUE3jRh2toLQjDTC0%21DpiPeEJ%21RaSopv8GqQED0zjS950McXU5q%21Zb1IwbDajCX0cGXa6YIV*fhHQDgwa9lgowtsqEvDaN67F5uS8sxJE8Fb%21FCBvsAMb8miWY1M9IjFQ5r6tBkip*CQ%21npN2LmF9pG4EHcVJDmpFG9SeL*V0LVBjhh7oXJrO8dG14nT7n7Q9HeQHBLDA%24%24&grant_type=refresh_token'
    },
    request: <ref *1> ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: '597',
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'POST /common/oauth2/v2.0/token HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Content-Type: application/x-www-form-urlencoded\r\n' +
        'User-Agent: axios/1.2.6\r\n' +
        'Content-Length: 597\r\n' +
        'Accept-Encoding: gzip, compress, deflate, br\r\n' +
        'x-vercel-id: iad1::lpcmf-1699061126575-0b764db50c6a\r\n' +
        'Host: login.microsoftonline.com\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      joinDuplicateHeaders: undefined,
      path: '/common/oauth2/v2.0/token',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'login.microsoftonline.com',
      protocol: 'https:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(errored)]: null,
      [Symbol(kHighWaterMark)]: 16384,
      [Symbol(kRejectNonStandardBodyWrites)]: false,
      [Symbol(kUniqueHeaders)]: null
    },
    data: {
      error: 'invalid_grant',
      error_description: "AADSTS70000: The provided value for the input parameter 'refresh_token' or 'assertion' is not valid. The token was issued for a different client id Trace ID: 3bd6f382-1062-4838-b007-a91b28882300 Correlation ID: 52af4eac-d308-4d2d-a409-6da31b61ccf2 Timestamp: 2023-11-04 01:25:27Z",
      error_codes: [Array],
      timestamp: '2023-11-04 01:25:27Z',
      trace_id: '3bd6f382-1062-4838-b007-a91b28882300',
      correlation_id: '52af4eac-d308-4d2d-a409-6da31b61ccf2',
      error_uri: 'https://login.microsoftonline.com/error?code=70000'
    }
  }
}
Error: Runtime exited with error: exit status 1
Runtime.ExitError

@3kh0
Copy link
Author

3kh0 commented Nov 4, 2023

Sorry, found the fix, the refresh token was still stored in the Redis database, so the site was going crazy, sorry for wasting time!

@3kh0 3kh0 closed this as completed Nov 4, 2023
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

No branches or pull requests

2 participants