question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid URI: The format of the URI could not be determined.

See original GitHub issue

Library name and version

Azure.ResourceManager.DataProtectionBackup 1.1.1

Query/Question

The error originates from DataSourceInfo.Serialization.cs(probably on Line#112 - resourceUri = new Uri(property.Value.GetString());) Here is the code snippet that throws the exception - `

           var resourceId = DataProtectionBackupVaultResource.CreateResourceIdentifier(
                            _subscriptionId,
                            _resourceGroupName,
                            _vaultName);
            var resource =
                _armClient.GetDataProtectionBackupVaultResource(resourceId
                    );

            var backupVault = await resource.GetAsync();

            var backupInstancesCollection = backupVault.Value.GetDataProtectionBackupInstances().GetAllAsync();

`

Here is another code snippet that throws the same exception. `

             var resourceId = DataProtectionBackupInstanceResource.CreateResourceIdentifier(
                            _subscriptionId,
                            _resourceGroupName,
                            _vaultName,
                            _backupInstanceName);
            var resource =
                _armClient.GetDataProtectionBackupInstanceResource(resourceId
                    );
           
            var backupInstance = await resource.GetAsync();

` Both the snippets provided are trying to get a BackupInstanceResource object

Based on my research, the resourceUri property that gets returned in the REST api call is not a valid Uri. In the Azure portal it shows up like this. Added placeholders to show some confidential Ids. "resourceUri": "/subscriptions/{subscriptionId}/resourceGroups/myRg/providers/Microsoft.Storage/storageAccounts/samplestorageaccount"

Environment

Microsoft Visual Studio Enterprise 2022 (64-bit) - Current Version 17.2.5

image

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
HarveyLinkcommented, Apr 17, 2023

Hi @campionite , thank you for the feedback. We’ll apply a hotfix for this issue.

0reactions
HarveyLinkcommented, Apr 26, 2023
Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid URI: The format of the URI could not be determined
When creating a Uri from these two I get the "format could not be determined" exception unless I use the constructor with the...
Read more >
the format of the URI could not be determined.' error in ...
The UriFormatException is thrown by the Uri class constructor if the supplied URI could not be correctly parsed. The format for a valid...
Read more >
Invalid URI: The format of the URI could not be determined.
While seeing the error logs in service center, it says "Invalid URI: The format of the URI could not be determined".
Read more >
Invalid URI: The format of the URI could not be determined
The Core Business Layer fails to start with the following error message: UriFormatException: Invalid URI: The format of the URI could not be...
Read more >
The format of the URI could not be determined. on calling ...
Describe the bug We have a code base that is on .NET Core 3.1 and we are upgrading it to .NET 6. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found