Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: Unexpected error when running action. Error Message: The remote server returned an error: (404) Not Found #1349

Open
Marhoon opened this issue Dec 4, 2024 · 4 comments
Labels
question Further information is requested

Comments

@Marhoon
Copy link

Marhoon commented Dec 4, 2024

Question

I add decency to my project (B) from other common Library (A) but not in same workspace, i add the below to (B) in the repo variable settings

ALGOREPOSETTINGS
"appDependencyProbingPaths": [
{
"repo": "Dynamics-Business-Solutions/Dynamics-Library",
"release_status": "latestBuild"
}
]

when i run action to compile it i get bellow error
Unexpected error when running action. Error Message: The remote server returned an error: (404) Not Found

Run microsoft/AL-Go-Actions/DownloadProjectDependencies@v6.0
Run actions/download-artifact@v4
  
Found 0 artifact(s)
No input name or pattern filtered specified, downloading all artifacts
An extra directory with the artifact name will be created for each download
Total of 0 artifact(s) downloaded
Download artifact has finished successfully
Run D:\a\_actions\microsoft\AL-Go-Actions\v6.0\DownloadProjectDependencies/../Invoke-AlGoAction.ps1 -ActionName "DownloadProjectDependencies" -Action {
  
Downloading dependencies for project 'W1'. BuildMode: Default, Base Folder: D:\a\Bahrain-Generic-Reports-Extension\Bahrain-Generic-Reports-Extension, Destination Path: D:\a\Bahrain-Generic-Reports-Extension\Bahrain-Generic-Reports-Extension/.dependencies
Downloading project dependencies from current build
Downloading project dependencies from probing paths
Analyzing repository
No performance test apps found in bcptTestFolders in .AL-Go\settings.json
Checking appDependencyProbingPaths
Dependency to projects '*' in https://github.com/Dynamics-Business-Solutions/Dynamics-Library@main, version latest, release status latestBuild
Using GITHUB_TOKEN for access to repository
Locating Apps artifacts for projects: *
Finding latest successful CICD run for branch main in repository Dynamics-Business-Solutions/Dynamics-Library
- https://api.github.com/repos/Dynamics-Business-Solutions/Dynamics-Library/actions/runs?per_page=100&page=1&exclude_pull_requests=true&status=completed&branch=main
The remote server returned an error: (404) Not Found. 

Not Found

Applying settings from D:\a\Bahrain-Generic-Reports-Extension\Bahrain-Generic-Reports-Extension\.github\AL-Go-Settings.json
No settings found in D:\a\Bahrain-Generic-Reports-Extension\Bahrain-Generic-Reports-Extension\.AL-Go\settings.json
No settings found in D:\a\Bahrain-Generic-Reports-Extension\Bahrain-Generic-Reports-Extension\.github\CICD.settings.json
No settings found in D:\a\Bahrain-Generic-Reports-Extension\Bahrain-Generic-Reports-Extension\.AL-Go\CICD.settings.json
No settings found in D:\a\Bahrain-Generic-Reports-Extension\Bahrain-Generic-Reports-Extension\.AL-Go\Marhoon.settings.json
Enabling Microsoft telemetry...
Error: Unexpected error when running action. Error Message: The remote server returned an error: (404) Not Found.   Not Found , StackTrace: at InvokeWebRequest, D:\a\_actions\microsoft\AL-Go-Actions\v6.0\Github-Helper.psm1: line 112 <- at FindLatestSuccessfulCICDRun, D:\a\_actions\microsoft\AL-Go-Actions\v6.0\Github-Helper.psm1: line 836 <- at GetArtifacts, D:\a\_actions\microsoft\AL-Go-Actions\v6.0\Github-Helper.psm1: line 985 <- at GetDependencies, D:\a\_actions\microsoft\AL-Go-Actions\v6.0\Github-Helper.psm1: line 174 <- at DownloadDependenciesFromProbingPaths, D:\a\_actions\microsoft\AL-Go-Actions\v6.0\DownloadProjectDependencies\DownloadProjectDependencies.Action.ps1: line 24 <- at <ScriptBlock>, D:\a\_actions\microsoft\AL-Go-Actions\v6.0\DownloadProjectDependencies\DownloadProjectDependencies.Action.ps1: line 116 <- at <ScriptBlock>, D:\a\_temp\8e72486b-c07b-4084-a114-6d4adee[65](https://github.com/Dynamics-Business-Solutions/Bahrain-Generic-Reports-Extension/actions/runs/12161475220/job/33935460984#step:7:67)71e.ps1: line 3 <- at <ScriptBlock>, D:\a\_actions\microsoft\AL-Go-Actions\v6.0\Invoke-AlGoAction.ps1: line 17 <- at <ScriptBlock>, D:\a\_temp\8e72486b-c07b-4084-a114-6d4adee6571e.ps1: line 2 <- at <ScriptBlock>, <No file>: line 1
Error: Process completed with exit code 1.
@Marhoon Marhoon added the question Further information is requested label Dec 4, 2024
@Marhoon
Copy link
Author

Marhoon commented Dec 16, 2024

@freddydk hi sir, appreciate your advice on the same sir

@freddydk
Copy link
Contributor

Sorry for the delay.
You probably need to specify an authtoken for the appdependencyprobingpath - see https://aka.ms/algosettings#appdependencyprobingpaths

Alternatively, you can use GitHubPackages by creating an organizational secret called GitHubPackagesContext - then all dependency resolution between apps in your org will be automatic. https://aka.ms/algosecrets#githubpackagescontext

@Marhoon
Copy link
Author

Marhoon commented Dec 16, 2024

Hi Sir @freddydk

I used below variable in the repository

{  
"appDependencyProbingPaths": [
    {
      "repo": "Dynamics-Business-Solutions/Dynamics-Library",
      "release_status": "latestBuild",
      "authTokenSecret": "GHTOKENWORKFLOW"
    }
  ]
}
Analyzing repository
  Checking type
  Checking appFolders, testFolders and bcptTestFolders
  Application Dependency 24.0.0.0
  Updating app- and test Dependencies
  Analyzing Test App Dependencies
  
No performance test apps found in bcptTestFolders in .AL-Go\settings.json
Checking appDependencyProbingPaths
Dependency to projects '*' in https://github.com/Dynamics-Business-Solutions/Dynamics-Library@main, version latest, release status latestBuild
Using secret GHTOKENWORKFLOW for access to repository
Locating Apps artifacts for projects: *
Finding latest successful CICD run for branch main in repository Dynamics-Business-Solutions/Dynamics-Library
- https://api.github.com/repos/Dynamics-Business-Solutions/Dynamics-Library/actions/runs?per_page=100&page=1&exclude_pull_requests=true&status=completed&branch=main
The remote server returned an error: (401) Unauthorized. 

Unauthorized

I am not sure if need to modify the setting for secret GHTOKENWORKFLOW

@freddydk
Copy link
Contributor

That sounds like the GhTokenWorkflow secret doesn't have read access to the Dynamics-Business-Solutions/Dynamics-Library repository?
You don't have to modify that secret - you can create another PAT with read access to that repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants