Copy Project from app to development environment

Description of the limitation and why it is relevant to address

As a Developer I want to be able to copy a project from the live environment to the development environment so that I can recreate error situations that the users have.

I think this is relevant for the VIKTOR platform because it allows bugs/problems to be dealt with quicker.

The current solution is to manually fill in a project as they have. For a simple app this is workable but for larger apps with multiple levels, this costs a lot of time.

Hi Natalie,

Thanks for taking the time to write out this request! Your question makes a lot of sense, so much so that VIKTOR’s own developers have developed a tool that just this! There is no magic to it, as every VIKTOR app is accessible through an API already anyway, but the tool is not on a (polish) level that we are going to share it with the world. I think there may be a lot of ways VIKTOR could offer you some functionality similar to what you describe, so I made a issue on our internal board to track this request.

In the not-too-distant future we are going to roll out some things that will help you as a developer to find out what is going wrong for a user, which might alleviate some of the annoyance. We will keep you posted on that!

In the meantime the feature that @rweigand desribes has been released: users can report problems they encounter in production, resulting in an error report which contain the params of the job that failed.

@NBouwman: does that address your main concern? If not, could you explain what is missing?

@NBouwman, more good news: the VIKTOR Development Tools repository is now public!!! :partying_face:

Please heed the warnings which are stated in the Readme, but these tools do allow you to do exactly what you’re asking for in this feature request

Let us know what you think about it!

1 Like

Hi, is this available with SSO ? I can’t seem to be able to log in (“Provided credentials are not valid.”)

Regards,
LĂ©opold

Im not very familiar with the code, but this line seems to suggest you can provide a token:

more info on personal access tokens: Frequently Asked Questions | VIKTOR Documentation

Hi, I tried with the token (developper and access token just in case) with the following syntax :
dev-cli copy-entities -s vinci -st token_here -sw 96 -si 678 -dw 7
And a lot of other syntaxes to try, nothing seems to be working, I always get this error:
Logging in to vinci
Provided credentials are not valid.
{“error”: “unsupported_grant_type”}

Hi Leomalet,

This development-tools repo is a bit outdated and will need some love.

Note that this was created before we even had Personal Access Tokens, so this source_token points to the Bearer Token of your login-session.

  1. First log in to your environment
  2. open the development tools of your browser (usually found by pressing F12)
  3. Go the the Network tab and find an API request that seems related to VIKTOR (you might need to try a few, or refresh the page)
  4. Inspect the Request Headers, this will most likely contain a
    Authorization: Bearer <your temp token here> header.

This is the token that is to be filled in for the -st <your temp token here> option. Note that on SSO environments, this token expires within 15 minutes. (which is one of the reasons why we introduced the PAT)

Could you let me know if this solves your problem?

I will also try to find some time to update the current repo to make use of our latest and greatest features, but cannot commit to anything soom.

1 Like

Hi Kevin, thank you for the quick feedback, I tried with the Bearer token but I still have the exact same error.

Alright, thanks for letting me know.

Then I’ll need a bit more time to figure this out. Will come back to you.