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.

[BUG] Better errors when publishing

See original GitHub issue

Release version

v1.2.0

Describe the bug

Errors seems to not contain enough information to help debug / figure our the issue.

crit: publisher.Publisher[0] System.ArgumentException: An element with the same key but a different value already exists. Key: ‘Put’ at System.Collections.Immutable.ImmutableDictionary2.HashBucket.Add(TKey key, TValue value, IEqualityComparer1 keyOnlyComparer, IEqualityComparer1 valueComparer, KeyCollisionBehavior behavior, OperationResult& result) at System.Collections.Immutable.ImmutableDictionary2.AddRange(IEnumerable1 items, MutationInput origin, KeyCollisionBehavior collisionBehavior) at System.Collections.Immutable.ImmutableDictionary2.AddRange(IEnumerable1 pairs, Boolean avoidToHashMap) at System.Collections.Immutable.ImmutableDictionary2.AddRange(IEnumerable1 pairs) at System.Collections.Immutable.ImmutableDictionary.ToImmutableDictionary[TSource,TKey,TValue](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 keyComparer, IEqualityComparer1 valueComparer) at System.Collections.Immutable.ImmutableDictionary.ToImmutableDictionary[TSource,TKey,TValue](IEnumerable1 source, Func2 keySelector, Func2 elementSelector) at publisher.Publisher.GetFileRecordsFromCommitId(CommitId commitId, CancellationToken cancellationToken) at publisher.Publisher.GetFilesToProcess(CancellationToken cancellationToken) at publisher.Publisher.Run(CancellationToken cancellationToken) at publisher.Publisher.ExecuteAsync(CancellationToken cancellationToken) info: Microsoft.Hosting.Lifetime[0] Application is shutting down... fail: Microsoft.Extensions.Hosting.Internal.Host[9] BackgroundService failed System.ArgumentException: An element with the same key but a different value already exists. Key: 'Put' at System.Collections.Immutable.ImmutableDictionary2.HashBucket.Add(TKey key, TValue value, IEqualityComparer1 keyOnlyComparer, IEqualityComparer1 valueComparer, KeyCollisionBehavior behavior, OperationResult& result) at System.Collections.Immutable.ImmutableDictionary2.AddRange(IEnumerable1 items, MutationInput origin, KeyCollisionBehavior collisionBehavior) at System.Collections.Immutable.ImmutableDictionary2.AddRange(IEnumerable1 pairs, Boolean avoidToHashMap) at System.Collections.Immutable.ImmutableDictionary2.AddRange(IEnumerable1 pairs) at System.Collections.Immutable.ImmutableDictionary.ToImmutableDictionary[TSource,TKey,TValue](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 keyComparer, IEqualityComparer1 valueComparer) at System.Collections.Immutable.ImmutableDictionary.ToImmutableDictionary[TSource,TKey,TValue](IEnumerable1 source, Func2 keySelector, Func2 elementSelector) at publisher.Publisher.GetFileRecordsFromCommitId(CommitId commitId, CancellationToken cancellationToken) at publisher.Publisher.GetFilesToProcess(CancellationToken cancellationToken) at publisher.Publisher.Run(CancellationToken cancellationToken) at publisher.Publisher.ExecuteAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService) crit: Microsoft.Extensions.Hosting.Internal.Host[10] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted. System.ArgumentException: An element with the same key but a different value already exists. Key: ‘Put’ at System.Collections.Immutable.ImmutableDictionary2.HashBucket.Add(TKey key, TValue value, IEqualityComparer1 keyOnlyComparer, IEqualityComparer1 valueComparer, KeyCollisionBehavior behavior, OperationResult& result) at System.Collections.Immutable.ImmutableDictionary2.AddRange(IEnumerable1 items, MutationInput origin, KeyCollisionBehavior collisionBehavior) at System.Collections.Immutable.ImmutableDictionary2.AddRange(IEnumerable1 pairs, Boolean avoidToHashMap) at System.Collections.Immutable.ImmutableDictionary2.AddRange(IEnumerable1 pairs) at System.Collections.Immutable.ImmutableDictionary.ToImmutableDictionary[TSource,TKey,TValue](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 keyComparer, IEqualityComparer1 valueComparer) at System.Collections.Immutable.ImmutableDictionary.ToImmutableDictionary[TSource,TKey,TValue](IEnumerable1 source, Func2 keySelector, Func`2 elementSelector) at publisher.Publisher.GetFileRecordsFromCommitId(CommitId commitId, CancellationToken cancellationToken) at publisher.Publisher.GetFilesToProcess(CancellationToken cancellationToken) at publisher.Publisher.Run(CancellationToken cancellationToken) at publisher.Publisher.ExecuteAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService) Error: Process completed with exit code 255.

Expected behavior

Errors should highlight the api / product / file that is causing the error

Actual behavior

Errors are internal errors missing details

Reproduction Steps

Deploy apis / products with exceptions

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jarkkojarvinencommented, Nov 14, 2022

Issue with v1. I just updated v2 and this issue doesn’t exists anymore. Thanks for new version!

0reactions
guythetechiecommented, Nov 11, 2022

@jarkkojarvinen - are you seeing this issue when using v2 or v1? If v1, please try again with the latest code and report back.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Publish wizard throws "One or more errors occurred. ...
Both fail with a useless “One or more errors occurred.” error. Nothing in the output window. No idea what the error(s) is/are.
Read more >
Common Publishing Errors and How to Fix Them | Lulu
Running into errors making a book? This article will clarify the issue & walk you through solutions to common publishing errors.
Read more >
ios - What is the best practice for dealing with errors ...
First, I'm trying to figure out what these errors are so I can try to deal with them better... is the error really...
Read more >
BetterErrors/better_errors: Better error page for Rack apps
Better Errors replaces the standard Rails error page with a much better and more useful error page. It is also usable outside of...
Read more >
Resolved - Publish failed. Check output for more details.
Guys, I've solved the problem. It seems that I did not set the framework to .NET 4.8 before publishing the project on my...
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