Error occurs when attempting to upgrade code repository

Hi everyone!

I opened up my code repository today and encountered the following error:

I’m met with another error when clicking ‘Upgrade’ at the top right of my code repo:

The error message is kind of unhelpful. What gives?

@davidszy

the first error is the real one. your repo pins node 22.21.1 and the artifact proxy no longer serves that version (the 403 on nodeSetup), so the repo has to be upgraded to pull a newer node. someone hit the same thing yesterday with a 403 on a different node version, upgrade + merge fixed it: https://community.palantir.com/t/7437

for the “Invalid Argument” on Upgrade, a few things to check:

  1. look at the pull requests tab first. upgrades come as a PR from a separate branch into your default branch, so if one is already open, merge that one instead of clicking Upgrade again
  2. switch to your default branch (master/main) before clicking Upgrade, the upgrade PR targets the default branch
  3. make sure you’re owner/editor on the repo, merging into a protected branch needs that
  4. if there’s an old upgrade PR that someone committed to, or it overwrites template files you edited, it won’t merge cleanly. close it and run Upgrade again

after the merge, refresh, and if you have a lockfile regenerate it, the person in the other thread had to do that too before checks went green.

Hey, appreciate the response :slight_smile:

I saw that thread yesterday before I submitted this post! I agree that the node version mismatch is what’s causing the issue and that upgrading the repo is the solution.

However, upgrading the repo is the problem here. Regarding your bullet points: there are no open pull requests; I’ve tried clicking Upgrade on the master branch; and I’ve got editor perms on the repo.

Clicking Upgrade instantly results in the error I included in my original post. I’ll keep troubleshooting!

@davidszy thanks for ruling those out, that narrows it down. if Upgrade fails instantly with no PR and you’re on master with editor, it’s probably something on the platform side rather than your repo. the docs say repos on a template version that’s too old can’t be auto upgraded, which might be what’s happening here.

two things I’d try:

  1. create a fresh typescript functions repo, check which node version it pins (nodeInstallationVersion in gradle.properties) and bump yours to match on a branch. if the proxy serves that version, nodeSetup should get past the 403
  2. send the error ID from your screenshot to Palantir support, that’s the only way to see what “Invalid Argument” actually refers to