Skip to content

Conversation

@babuscam
Copy link
Contributor

  • moved _allMarketplaces below the marketplaces, because static fields are initialized in the order they appear in the source code and allMarketplaces had null values

…are initialized in the order they appear in the source code and allMarketplaces had null values
@pandapknaepel
Copy link

I just ran into this exact bug with a NullReferenceException in GetMarketPlaceByID. As the contributor correctly identified, the static initialization order causes _allMarketplaces to be populated with null values.

@abuzuhri, this is a critical fix for anyone using the marketplace utility methods. Please consider merging this PR to restore stability.

@ProNotion
Copy link
Collaborator

A small typo still in the file marketpalce should be marketplace 👍

@TManITtech
Copy link
Contributor

I also get this critical error:

System.NullReferenceException: Object reference not set to an instance of an object.
   at FikaAmazonAPI.Utils.MarketPlace.<>c__DisplayClass19_0.<GetMarketPlaceByID>b__0(MarketPlace a)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at FikaAmazonAPI.Utils.MarketPlace.GetMarketPlaceByID(String id)

@abuzuhri please expedite this fix asap.

Copy link
Contributor

@TManITtech TManITtech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this fix and it works.

@abuzuhri
Copy link
Owner

Its fixed now before i see this PR

@abuzuhri abuzuhri closed this Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants