Mark Mazelin (Cedarville University) asked a question.

error running "sf migrate template" command

I'm beginning to migrate my site from MVC to NextJS. I have the NextJs portion running (and can access the website + the backend), but every time I try to do a migration, starting with templates, I get an error that is not helpful. Here is an example. When I execute this command:

  1. sf migrate template 7cd2ae28-6221-xxxx

I get this result:

  1. One or more errors occurred. (Unexpected character encountered while parsing value: <. Path '', line 1, position 1.)

I've checked Windows Event Viewer and SF logs and can't find any further details about what these errors are.

 

How can I dig into this and find out what's going on? "sf" seems to be a bit of a black box that isn't logging anywhere.

 

NOTES:

  1. I'm using the appsettings.json to specify the cmsurl, token, and framework.
  2. I've tried both my .NET CMS URL and my NextJS URL as the CMS URL.
  3. I've tried both NextJS running through IIS and running locally with npm run dev.
  4. I can access the /api/default endpoint (which is set open to Everyone) from Postman without issue.

 

 


  • Jonathan Read (Progress Software)

    what version of the Sitefinity CLI are you using sf version. Make sure you are using the latest: https://github.com/Sitefinity/Sitefinity-CLI/releases

     

    The issue seems you are getting an HTML response instead of JSON most likely a 404, 400, maybe even a 500. I would confirm your access token and the permission that user has.

  • Mark Mazelin (Cedarville University)

    I'm using the latest release - 1.1.0.82. Do I need to use one of the pre-release versions?

     

    Is there any way to see the URLs being called?

  • Mark Mazelin (Cedarville University)

    creating a new user and generating a new token worked. is there any way to re-generate an access token for an existing user?

     

    can I put a plug in to make the sf tool report better errors??

    • Jonathan Read (Progress Software)

      I would comment in GitHub repo with you suggestions. In the user screen you can revoke the current access token and then regenerate it.

      • Mark Mazelin (Cedarville University)

        Thanks. I checked our normal API user and for some reason the Revoke option is not there. It is on the new user I created for testing this process. I'm not sure why that would be, but that's now a side conversation on this post...

      • Jonathan Read (Progress Software)

        Users created with SSO do not have the options for access token, this could be why.

      • Mark Mazelin (Cedarville University)

        It's a local user that has the access token (with the green checkbox), but no option to revoke. ¯\(ツ)/¯ (no shrug icon in this editor??)