-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
An unhandled exception occurred. System.Exception: Process has terminated #78
Comments
Here is the complete vebose log.
|
Hi @janmechtel I wonder whether this might be related to #60. The |
Thanks for the super-fast reply. I do indeed run the store version. I guess I can switch to trying to install the .msi Setting
Unfortunately the end result is still the same
|
I'll try the non-store version of Power BI Desktop |
Okay, thanks for checking that anyway! It's a first - I've extracted thousands of files using this method so far. I wonder whether something is unique to your test PBIX? Have you tried this with others? Would you possibly be able to share a failing file for further diagnostics? |
Actually strike that, I've had another look at your log. Two things here:
Given what I can see, it's very likely this is the same as #60. Please retry with another temp dir. |
Ok I've installed Power BI Desktop (non-store) and also tried in an Administrator elevated shell. Same problem. For the test.pbix please see test.zip. It's actually I've created Maybe it's related to the |
Moved it to C:\Projects still same problem. I'll have a look at the code and see if I can run the MSMDSRV myself? Maybe there is a way to get a log from it.
|
Uhm.... Your That same file opens fine in PBI Desktop? Could you try to run the |
The directory given on the |
The auto-generated ini won't be sufficient to open PBI models. It needs to be the one provided by PBI Desktop or |
I can try with a different ini file. I'm just surprised that there is no meaningful output / msmdsrv.exe doesn't show up in my process list yet at all. |
So loading msmdsrv.exe with an existing ini directory (as being use bei PowerBI Desktop works fine).
Will show meaningful output and the process is visible in Task manager |
I'll try to see if I can observe the ini that pbi-tools are supposed to put into the _tempDirectory Is there a way to change the working directory? |
How should I understand this here:
On first glance it looks like it's setting the folder to the temp working directory. |
Those files get auto deleted as soon as the msmdsrv process exits (even when it fails). But I could provide a private build which doesn't do that. |
If you like I can also try to build myself, in case you want some battle testing for the build instructions? It's been a while since i did anything with VS Studio though. Might be more work than help. |
So quick update, my other machine works fine. Even with the Power BI Desktop version from the store :-/ Maybe I should restart and try again on this machine. |
Just pushed a new branch with some debug enhancements to https://github.com/pbi-tools/pbi-tools/tree/Issues/78-MT (accidentally also pushed it to This one allows you to set a new environment variable
The effect of that is twofold:
Checkout the branch and build with:
That'll create the exe in (I've just seen your previous note!) |
So building worked and I debug now. First observation is that there is msmdsrv_Failed_ini.bak visible (before all of the files get deleted). I believe it's written after pbi-tools attempts to run the process msmdsrv. I've also tried to make the process window visible but it only flashes. Now I'll try to get the exact command of the process that pbi-tools would run and then try to run that manually. |
Running it manually doesn't do much
Neither the _Failed.bak is written, nor does the process show up in task manager. |
Ok, I'll check it out now. |
No dice yet, but indeed the temp directory is the local directory now.
|
I go for the restart before we waste the whole night. |
After restart and same problem. I've attempted to put the process id from my current powershell into the msmdsrv.ini but it results in the same behavior:
I'll check if there is a "verbose" mode for msmdsrv.exe |
Fix for this is now available in interim release: https://github.com/pbi-tools/pbi-tools/releases/tag/1.0.0-beta.9%2B220202 Thanks again @janmechtel for extensive help here! |
Hello @mthierba , |
Hi, your command ( This example uses "Files" for the manifest and "Development" for the environment: |
Thanks @mthierba for your quick reply. |
Hello @mthierba, |
@Khushi186 Running pbi-tools deploy with the |
Thanks, Tested it locally, its working now. |
Hello @mthierba |
Your service principal is not sufficiently set up. There are a few prerequisites you should check:
The screenshot shows some broken labels - this currently applies to many PBI tenants while some backend updates are being rolled out.
With those three settings in place things should work well! |
No permissions should be added in AAD, neither Application nor Delegated. All you need is a blank AAD application with a secret set. |
Yesterday I added those permissions and after that pipeline was working fine. Today it started failing. |
I'd suggest to create an entirely new, clean, app with no permissions applied from the start. There may well be some sync issues now after you made various changes. |
Ok, Thanks. I will create new one and will also update you once my pipeline will start working again. |
Thanks @mthierba. Its working with New SPN. |
Hello @mthierba ,
|
You're deploying a thin report, and either the referenced data model doesn't exist, or your deployment principal doesn't have permission on the data model (more likely). Check the dataset permissions.
…________________________________
From: ***@***.*** ***@***.***>
Sent: Friday, November 17, 2023 8:22:34 AM
To: pbi-tools/pbi-tools ***@***.***>
Cc: Mathias Thierbach ***@***.***>; Mention ***@***.***>
Subject: Re: [pbi-tools/pbi-tools] An unhandled exception occurred. System.Exception: Process has terminated (Issue #78)
Hello @mthierba<https://github.com/mthierba> ,
My workflow for report deployment was working properly till yesterday but now I am getting error which seems related to import operations but not sure how to resolve this.
Can you please help me how can I resolve this ? Below is the error :
Run /app/pbi-tools/pbi-tools.core deploy . "$PROFILE" "$ENVIRONMENT"
Reading PBIXPROJ settings from: /__w/RDA-Orbis-PowerBI-Reports/RDA-Orbis-PowerBI-Reports/.pbixproj.json
Starting deployment 'Files' into environment: Test .
Found 5 source files to deploy.
Access token received. Expires On: 11/17/2023 16:37:5
Resolved workspace ID '9<https://github.com/tomtom-internal/RDA-Orbis-PowerBI-Reports/actions/runs/6906027799/job/18790100569#step:4:10>356296d-a47f-4e61-a982-80fbf5dcd4fe' for workspace: 'Maps Ops RDA Orbis Report (Test)'
An unhandled exception occurred.
System.AggregateException: One or more errors occurred. (HTTP Error: BadRequest
{
"error": {
"code": "PowerBIModelNotFoundException",
"pbi.error": {
"code": "PowerBIModelNotFoundException",
"parameters": {},
"details": [],
"exceptionCulprit": 1
}
}
})
---> PbiTools.Deployments.DeploymentException: HTTP Error: BadRequest
{
"error": {
"code": "PowerBIModelNotFoundException",
"pbi.error": {
"code": "PowerBIModelNotFoundException",
"parameters": {},
"details": [],
"exceptionCulprit": 1
}
}
}
---> Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'BadRequest'
at Microsoft.PowerBI.Api.ImportsOperations.UploadFile(Nullable1 groupId, Stream file, String datasetDisplayName, Nullable1 nameConflict, Nullable1 skipReport, Nullable1 overrideReportLabel, Nullable1 overrideModelLabel, Dictionary2 customHeaders, CancellationToken cancellationToken)
at Microsoft.PowerBI.Api.ImportsOperations.PostImportFileWithHttpMessage(Nullable1 groupId, Stream file, String datasetDisplayName, Nullable1 nameConflict, Nullable1 skipReport, Nullable1 overrideReportLabel, Nullable1 overrideModelLabel, Dictionary2 customHeaders, CancellationToken cancellationToken)
at Microsoft.PowerBI.Api.ImportsOperationsExtensions.PostImportWithFileAsyncInGroup(IImportsOperations operations, Guid groupId, Stream fileStream, String datasetDisplayName, Nullable1 nameConflict, Nullable1 skipReport, Nullable1 overrideReportLabel, Nullable1 overrideModelLabel, CancellationToken cancellationToken)
at PbiTools.Deployments.DeploymentManager.ImportReportAsync(ReportDeploymentInfo args, IPowerBIClient powerbi, String workspace, IDictionary`2 workspaceIdCache) in X:\pbi-tools\BRANCHES\fody\src\PBI-Tools\Deployments\DeploymentManager.Report.cs:line 302
at PbiTools.Deployments.DeploymentManager.DeployReportAsync(PbiDeploymentManifest manifest, String label, String environment) in X:\pbi-tools\BRANCHES\fody\src\PBI-Tools\Deployments\DeploymentManager.Report.cs:line 99
--- End of inner exception stack trace ---
at PbiTools.Deployments.DeploymentManager.DeployReportAsync(PbiDeploymentManifest manifest, String label, String environment) in X:\pbi-tools\BRANCHES\fody\src\PBI-Tools\Deployments\DeploymentManager.Report.cs:line 10<https://github.com/tomtom-internal/RDA-Orbis-PowerBI-Reports/actions/runs/6906027799/job/18790100569#step:4:11>3
at PbiTools.Deployments.DeploymentManager.DeployAsync(String profileName, String environment) in X:\pbi-tools\BRANCHES\fody\src\PBI-Tools\Deployments\DeploymentManager.cs:line 88
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at PbiTools.Cli.CmdLineActions.Deploy(String folder, String label, String environment, String basePath, Boolean whatIf) in X:\pbi-tools\BRANCHES\fody\src\PBI-Tools\Cli\Deploy.cs:line 41
--- End of stack trace from previous location ---
at PowerArgs.ArgAction.Invoke()
at PbiTools.Program.Main(String[] args) in X:\pbi-tools\BRANCHES\fody\src\PBI-Tools\Program.cs:line 104
Error: Process completed with exit code 24<https://github.com/tomtom-internal/RDA-Orbis-PowerBI-Reports/actions/runs/6906027799/job/18790100569#step:4:25>7.
Thanks in advance.
—
Reply to this email directly, view it on GitHub<#78 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AA4W3TXVTNZAXDWR2M2NOHTYE6FMVAVCNFSM5NGFVUO2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBRGY3TCOBQGA2A>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Here Thin report means what? Did not get it. |
Thin report means report with a live connection - that's what you have. Your service principal needs to have permissions on the dataset. That's not an admin setting, that's on the workspace.
…________________________________
From: ***@***.*** ***@***.***>
Sent: Friday, November 17, 2023 9:01:05 AM
To: pbi-tools/pbi-tools ***@***.***>
Cc: Mathias Thierbach ***@***.***>; Mention ***@***.***>
Subject: Re: [pbi-tools/pbi-tools] An unhandled exception occurred. System.Exception: Process has terminated (Issue #78)
Here Thin report means what? Did not get it.
Because we are trying to deploy report having a live connection to the dataset. and all the required permissions are there in the dataset as well.
Do I need to check with Power BI admin to enable and disable API permissions on Power BI Tenant setting to allow service principal to use Power BI Apis ?
—
Reply to this email directly, view it on GitHub<#78 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AA4W3TWNIPZ2SPPWBAPGS5TYE6J5DAVCNFSM5NGFVUO2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBRGY3TOOBSGU4Q>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hello @mthierba , |
Hello @mthierba , Thanks in advance |
@Khushi186 The |
Did you try to replicate the setup in another workspace? I can confirm that the error you've quoted is raised if (1) the referenced model doesn't exist, or (2) the principal does not have sufficient permissions. This is s setup issue and technically outside the scope of |
Yes I tried to do that but it was throwing same error and now when I dropped the -what if toggle from the deployment manifest its again giving same error - |
Hi @mthierba , Thanks |
@Khushi186 Since your issue is related to credentials/permissions, I'm assuming the (working) credentials configured in your new git repo do not match the (failing) ones in the old one? |
I have used the same credentials, no change at all...I just created new repository and setup workflow. |
This is happening coz I have branch protection rules enabled in GitHub repo and I toggled the "Disable" and "Enable" state of those rules, thats why its impacting the ability to run workflows. and its failing.... |
It is virtually impossible to comment further without detailed insights into your specific setup. Since we've already concluded that this is not a |
Hello @mthierba , An unhandled exception occurred. |
First of, we are ecstatic to see this released! Unfortunately I can't get it to run. I hope it's fine to post here.
I'm trying to start out by extracting from a .pbix fiel
.\pbi-tools.exe extract ".\test.pbix"
I've set the loglevel to verbose, but didn't spot anything more useful.
The text was updated successfully, but these errors were encountered: