get "Repository does not contain an Application file to import" trying to "Import from Source Control" GitHub

Mike D4
Tera Contributor

Trying to test out an integration but get stuck trying to "Import from Source Control" (GitHub)

 

Created an app. It works correctly.

Uploaded / synced it to GitHub account A.  Shared with GitHub account B.

From account B, forked a copy to account B.  Downloaded the URL from "Clone with HTTPS".

In a new ServiceNow Developer instance attempted to "Import from Source Control"

It appears to progress showing an increasing % complete but then I get an error:

"Repository does not contain an Application file to import"

 

Using this training and doc:

https://developer.servicenow.com/dev.do#!/learn/learning-plans/orlando/technology_partner_program_qu...

https://docs.servicenow.com/bundle/orlando-application-development/page/build/applications/task/t_Im...

 

1 ACCEPTED SOLUTION

Chris - thanks so much for your response.

I am not experiencing this problem anymore. I don't think I did anything to explicitly fix it.

Appreciate your suggestions

View solution in original post

11 REPLIES 11

Ramya30
Tera Contributor

This error is generated when one particular application file get auto-deleted from the repository. There is a sys_app_<sys_id of the app>.xml file under https://github.com/<github-handle>/<repo_name>/tree/master/<sys_id> 

 

Cause of this issue: When there is an update to the sys_app record (such as increasing the version), and updates to other files. When the user goes to commit those changes and then unselect the changes to the sys_app record which will cause the sys_app record to get deleted. This is based on an investigation done by ServiceNow and they are working towards putting a permanent fix to it. 

 

Workaround: Do not unselect changes to sys_app in the selective commit. In the case that you unselect sys_app changes, you can recover by restoring the file to your branch from a previous commit and apply remote changes on the instance. 

 

Thanks

Ramya

Community Alums
Not applicable

Yep! That worked for me, thank you for sharing:)

Chris Raga
Tera Expert

There is a Repository Configurations [sys_repo_config] table that stores any source control you have configured for your scoped apps. Fix:

  1. Delete the Repository Configurations [sys_repo_config] record for the corrupted source control
  2. Reload Studio
  3. Perform the "link to source control" step

You can use the same git branch and repository if you wish, this should overwrite any corrupted files.

Chris - thanks so much for your response.

I am not experiencing this problem anymore. I don't think I did anything to explicitly fix it.

Appreciate your suggestions

Renat Akhmedov
Tera Contributor

Make sure that before you use the Import application from source control you did a "merge" on your repository.

For example, your branch was "master" merge it to "main",

Also please mark this comment as "Helpful" if it really helped you.