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

Cannot read properties of null (reading '__typename') #85

Closed
NobleDraconian opened this issue Nov 23, 2023 · 14 comments
Closed

Cannot read properties of null (reading '__typename') #85

NobleDraconian opened this issue Nov 23, 2023 · 14 comments

Comments

@NobleDraconian
Copy link

Currently, when trying to export or import a project, this tool errors with the following error:

Cannot read properties of null (reading '__typename')

image

@timrogers
Copy link
Owner

@NobleDraconian Thanks for reaching out! That's strange. Would you be able to re-run in verbose mode (--verbose) and share the full output from the CLI? Could you also confirm where you are migrating from and to?

timrogers added a commit that referenced this issue Nov 27, 2023
Each of our commands' handlers is wrapped with an error handler,
`actionErrorHandler`, which logs the error message in red and
then exits with status code `1`.

An error's message is not necessarily super helpful - as seen
with the `Cannot read properties of null (reading '__typename')`
error in #85. This additionally logs the stack trace, giving more
context on what went wrong and where.
@timrogers
Copy link
Owner

I've just released v0.4.3 which will produce better error messages in cases like this (see #94) - can I suggest that you upgrade before you try again?

@NobleDraconian
Copy link
Author

Hi @timrogers! I updated the tool and ran the import command again. I was not able to reproduce the error I originally had, however I encountered another error:
image

@timrogers
Copy link
Owner

Hi @timrogers! I updated the tool and ran the import command again. I was not able to reproduce the error I originally had, however I encountered another error:

image

That's interesting 🤔 It seems like there is a bug with some field types or values.

I think that you should be able to see which project item it was trying to load if you look at the log output.

Would you be able to find that project item in the JSON file and send me the data to help me debug? You can email the address on my profile if you don't want to share it publicly.

@NobleDraconian
Copy link
Author

@timrogers

Here's the json you requested:

    {
      "content": {
        "__typename": "Issue",
        "title": "Change towers instead of speeding up the timer depending on the amount of players who have completed the tower",
        "number": 519,
        "repository": {
          "nameWithOwner": "PhoenixEntertainment/Project-Walljump"
        }
      },
      "fieldValues": {
        "nodes": [
          {
            "__typename": "ProjectV2ItemFieldUserValue"
          },
          {
            "__typename": "ProjectV2ItemFieldRepositoryValue"
          },
          {
            "__typename": "ProjectV2ItemFieldLabelValue"
          },
          {
            "__typename": "ProjectV2ItemFieldMilestoneValue"
          },
          {
            "__typename": "ProjectV2ItemFieldTextValue",
            "text": "Change towers instead of speeding up the timer depending on the amount of players who have completed the tower",
            "field": {
              "id": "PVTF_lAHOAZPDDM4ACibEzgBd3QU",
              "name": "Title"
            }
          },
          {
            "__typename": "ProjectV2ItemFieldSingleSelectValue",
            "field": {
              "id": "PVTSSF_lAHOAZPDDM4ACibEzgBd3Qc",
              "name": "Status"
            },
            "optionId": "4f787606"
          }
        ],
        "totalCount": 6
      },
      "isArchived": false,
      "type": "ISSUE",
      "id": "PVTI_lAHOAZPDDM4ACibEzgBYGEk"
    },

@timrogers
Copy link
Owner

@NobleDraconian Thank you! In the log output, I think it should tell you which field value is was trying to load. Can you take a look at the logs again?

@NobleDraconian
Copy link
Author

@timrogers Status was the field it errored on:
image

@timrogers
Copy link
Owner

@NobleDraconian Thanks! That's very strange. Would you be open to doing a Zoom call at some point to look into this? I'd like to debug, but it's hard in text form!

@NobleDraconian
Copy link
Author

@timrogers Do you have a discord? Discord would probably be easier, but I can do zoom if needed.

@timrogers
Copy link
Owner

I'm afraid that I don't. Is it okay if I email you at the address on your profile?

@NobleDraconian
Copy link
Author

@timrogers Yep, you are free to email me

@timrogers
Copy link
Owner

@NobleDraconian Sorry that we didn't get a chance to meet yet 😓 I'm on vacation this week, but I was wondering if you might be willing to try with the newly-released v0.6.0? --verbose mode will now log requests and responses, so you can see exactly what is happening under the hood, which might help us to understand this problem.

@NobleDraconian
Copy link
Author

Hi @timrogers! Sorry for the late response, had holiday stuff going on.

I'll try the new release later today!

@timrogers
Copy link
Owner

I'm going to close this as I haven't heard back from you, but feel free to add a comment if you still need help.

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