HSLdevcom / HSLdevcom/digitransit-ui

Invariant violation when using Digitransit

Open
#2,076 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
267
Forks
145
Avg merge
1d 15h
Merged PRs (30d)
75

Description

Using latest Digitransit master, I frequently got this error:

{ Invariant Violation: RelayPendingQueryTracker: Expected response to be an object, got `null`.
    at invariant (/var/www/transports/digitransit-ui-paris/node_modules/fbjs/lib/invariant.js:42:15)
    at /var/www/transports/digitransit-ui-paris/node_modules/react-relay/lib/RelayPendingQueryTracker.js:125:36
    at /var/www/transports/digitransit-ui-paris/node_modules/react-relay/lib/RelayTaskQueue.js:108:25
    at /var/www/transports/digitransit-ui-paris/node_modules/react-relay/lib/RelayTaskQueue.js:114:14
    at RelayTaskQueue._invokeWithinScopedQueue (/var/www/transports/digitransit-ui-paris/node_modules/react-relay/lib/RelayTaskQueue.js:154:7)
    at /var/www/transports/digitransit-ui-paris/node_modules/react-relay/lib/RelayTaskQueue.js:144:14
    at RelayTaskQueue._scheduleIfNecessary (/var/www/transports/digitransit-ui-paris/node_modules/react-relay/lib/RelayTaskQueue.js:171:9)
    at RelayTaskQueue.enqueue (/var/www/transports/digitransit-ui-paris/node_modules/react-relay/lib/RelayTaskQueue.js:120:10)
    at PendingFetch._handleQuerySuccess (/var/www/transports/digitransit-ui-paris/node_modules/react-relay/lib/RelayPendingQueryTracker.js:123:68)
    at tryCallOne (/var/www/transports/digitransit-ui-paris/node_modules/promise/lib/core.js:37:12) name: 'Invariant Violation', framesToPop: 1 }

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure against the latest Digitransit master, then inspect node_modules/react-relay/lib/RelayPendingQueryTracker.js around line 125 and the RelayTaskQueue frames in the trace. Done means identifying why the response is null and confirming that the same scenario no longer produces the invariant violation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.