question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect path delimiter used when exporting actions on Windows

See original GitHub issue

Description

When exporting a tenant with a action on Windows, the JSON metadata uses the Windows path delimiter (\) within the “code” field. This is fine if you then re-run the import on Windows again, however, for teams that use multiple OSs (and also CI/CD pipelines running Linux) this becomes a problem as the following error is displayed when running the import:

error: Unable to load file /opt/atlassian/pipelines/agent/build/auth0\actions\action-name\code.js due to Error: ENOENT: no such file or directory, access '/opt/atlassian/pipelines/agent/build/auth0\actions\action-name\code.js'

Example of json file

{
  "name": "action-name",
  "code": "auth0/actions/action-name/code.js",
  "runtime": "node16",
  "status": "built",
  "dependencies": [],
  "supported_triggers": [
    {
      "id": "credentials-exchange",
      "version": "v2"
    }
  ],
  "deployed": true
}

Reproduction

  • Create a tenant with an action
  • Export the tenant using a0deploy on a Windows OS
  • Import the tenant using a0deploy on a none Windows OS

Environment

Please provide the following:

  • Version of this library used: 7.2.0
  • Version of the platform or framework used, if applicable: Windows/Ubuntu Linux

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
willveddcommented, Oct 19, 2022

Update: After investigation it has been determined that this issue is only scoped to actions and when the operating systems of the machines that performed the import differs from that of the machine that did the export. Meaning, this issue won’t be experience if a windows machine performs both the export and the import.

The fix has been released with 7.15.1. It converts the path at runtime to support both windows and unix machines. Doing so maintains backwards-compatibility and won’t necessitate a new export of your actions.

Otherwise, we don’t have reason to believe that any other Windows issues exist at this time. If anyone is still having issues after updating, please feel empowered to open a new ticket.

0reactions
sergiughtcommented, Oct 14, 2022

Hey folks, we fixed this in https://github.com/auth0/auth0-deploy-cli/pull/668 and it will be available in the next release. Appreciate everyone’s patience!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Seemingly invalid path separator on Windows using actions ...
This behavior has to be specific to Linux containers. In windows containers, path separator has to match the windows path separator ( \...
Read more >
Delimited text format in Azure Data Factory - Microsoft Learn
This topic describes how to deal with delimited text format in Azure Data Factory and Azure Synapse Analytics.
Read more >
How to use "/" (directory separator) in both Linux and Windows ...
In Windows you can use either \ or / as a directory separator. Windows supports / in directory paths. What specific problem are...
Read more >
Connexion client known issues - OCLC Support
From the OCLC Gateway Export - Local System Settings window, ... This problem may occur only for those who use Windows XP or...
Read more >
The BCP (Bulk Copy Program) command in action - SQLShack
-T – Trusted Windows authentication; -t, – define comma as the field separator; -w – Use wide width data format; -b1000 – Export...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found