Cannot authorize Xamarin to access Google Play account

Hi,
I have an app published to the Play Store. Yesterday my laptop crashed and I had to reinstall Windows and Visual Studio. After I set everything up, I tried to publish an updated version of the app to the store. Upon reaching the "Register Google API Access" screen, I fill in the Client Id and Client Secret fields, then I hit Register. A Google authorization page loads in the browser, I give the required authorization and then I get back the standard success message ("Received verification code. You may now close this window"). However, after switching back to Visual Studio, I see this:

Looking at the Xamarin logs, I found this exception:

System.TypeInitializationException: The type initializer for 'Google.Apis.Json.NewtonsoftJsonSerializer' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified. at Google.Apis.Json.NewtonsoftJsonSerializer..ctor() at Google.Apis.Json.NewtonsoftJsonSerializer..cctor() --- End of inner exception stack trace --- at Google.Apis.Json.NewtonsoftJsonSerializer.get_Instance() at Google.Apis.Auth.OAuth2.Requests.TokenRequestExtenstions.<ExecuteAsync>d__0.MoveNext()

So it seems like Xamarin is trying to use version 10.0.0.0 of Json.NET, which cannot be located. I have no idea about how to solve this. Where is the Json.NET dll that Xamarin is using located? Please help as I need to get this app update out ASAP.

Thanks in advance

Posts

  • GuiF007GuiF007 USMember

    Exactly same problem right now....

  • stesvisstesvis USMember ✭✭✭

    Me too

    Does anybody have an idea?
    Everything was fine till last release and I only changed one line (and updated the packages)

  • AtoxAtox ITMember

    me too.. :(((

  • cjacquelcjacquel FRMember ✭✭✭

    Same problem, Please the Xamarin team it's urgent.

  • cjacquelcjacquel FRMember ✭✭✭

    Is it possible to publish with another method ? At hand ? But I have the message Apk not aligned

  • SpyrosBoutsisSpyrosBoutsis USMember ✭✭

    I can publish successfully by selecting "ad-hoc" in the distribution method screen, getting an APK and uploading manually to the Play Store. Apparently only the store integration is broken, which, of course, is enough to kill productivity...

  • LuisRodriguez92LuisRodriguez92 USMember ✭✭✭

    Same problem

  • LuisRodriguez92LuisRodriguez92 USMember ✭✭✭

    I could upload the application manually, first I opened the folder of the Archive Manager, then align the application (signed), and the went up manually to the store (google play console)

  • KrisAertsKrisAerts USMember

    I'm having the problem.

  • cjacquelcjacquel FRMember ✭✭✭

    Hello Luis,
    Which target version have you chose for Android to create the Apk for the Google store?
    Thx
    cjacquel

  • LuisRodriguez92LuisRodriguez92 USMember ✭✭✭

    @cjacquel said:
    Hello Luis,
    Which target version have you chose for Android to create the Apk for the Google store?
    Thx
    cjacquel

    Android 5.1

  • StevenWhite.9167StevenWhite.9167 AUMember ✭✭

    I have this too, just amazing. This stuff is so brittle. From the log.

    System.TypeInitializationException: The type initializer for 'Google.Apis.Json.NewtonsoftJsonSerializer' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
    at Google.Apis.Json.NewtonsoftJsonSerializer..ctor()
    at Google.Apis.Json.NewtonsoftJsonSerializer..cctor()
    --- End of inner exception stack trace ---
    at Google.Apis.Json.NewtonsoftJsonSerializer.get_Instance()
    at Google.Apis.Auth.OAuth2.Requests.TokenRequestExtenstions.d__0.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.d__35.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Google.Apis.Auth.OAuth2.Flows.AuthorizationCodeFlow.d__30.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Google.Apis.Auth.OAuth2.AuthorizationCodeInstalledApp.d__8.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.d__4.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.d__1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Xamarin.Ide.Google.GooglePlayStore.d__5.MoveNext() in C:\d\lanes\5156\70936af1\source\xamarinvs\src\Core\Xamarin.VisualStudio.Google\GooglePlayStore.cs:line 53

  • Have you found a solution to this problem? I need to upload to google and I cannot. Is there an alternative for this?

  • SpyrosBoutsisSpyrosBoutsis USMember ✭✭

    @JohnPatrikiadis said:
    Have you found a solution to this problem? I need to upload to google and I cannot. Is there an alternative for this?

    Yes, just do an ad-hoc distribution instead of Google Play distribution. Then upload the produced APK manually to the Play Store.

  • JonDouglasJonDouglas USXamarin Team, University, Developer Group Leader Xamurai

    Thank you all for the report on this issue. In the future, you can report this issue via the Report an Issue interface in Visual Studio:

    https://msdn.microsoft.com/en-us/library/mt632287.aspx

    https://docs.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio-2017

    As for a workaround until we can confirm and isolate this issue, you should be able to make an ad-hoc .APK and upload that to Google Play.

    https://developer.xamarin.com/guides/android/deployment,testing,_and_metrics/publishing_an_application/part_3-_publishing_an_application_on_google_play/manually-uploading-the-apk/

    Can anyone please provide reproduction steps and also confirmation if this is only present on Visual Studio 2015? Please also include your Version Information by going to Help -> About Visual Studio -> Copy Info

  • SpyrosBoutsisSpyrosBoutsis USMember ✭✭

    @JonDouglas said:
    Can anyone please provide reproduction steps and also confirmation if this is only present on Visual Studio 2015? Please also include your Version Information by going to Help -> About Visual Studio -> Copy Info

    Hi Jon, no, I'm experiencing this on Visual Studio 2017. Here's my detailed version info:

    Microsoft Visual Studio Community 2017 
    Version 15.4.3
    VisualStudio.15.Release/15.4.3+27004.2008
    Microsoft .NET Framework
    Version 4.7.02556
    
    Installed Version: Community
    
    Visual Basic 2017   00369-60000-00001-AA354
    Microsoft Visual Basic 2017
    
    Visual C# 2017   00369-60000-00001-AA354
    Microsoft Visual C# 2017
    
    Application Insights Tools for Visual Studio Package   8.9.00809.2
    Application Insights Tools for Visual Studio
    
    ASP.NET and Web Tools 2017   15.0.30925.0
    ASP.NET and Web Tools 2017
    
    ASP.NET Core Razor Language Services   1.0
    Provides languages services for ASP.NET Core Razor.
    
    ASP.NET Web Frameworks and Tools 2012   4.0.20601.0
    For additional information, visit https://www.asp.net/
    
    ASP.NET Web Frameworks and Tools 2017   5.2.50921.0
    For additional information, visit https://www.asp.net/
    
    Azure App Service Tools v3.0.0   15.0.30915.0
    Azure App Service Tools v3.0.0
    
    Common Azure Tools   1.10
    Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
    
    JavaScript Language Service   2.0
    JavaScript Language Service
    
    Merq   1.1.17-rc (cba4571)
    Command Bus, Event Stream and Async Manager for Visual Studio extensions.
    
    Microsoft Azure Tools   2.9
    Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50719.1
    
    Microsoft Continuous Delivery Tools for Visual Studio   0.3
    Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.
    
    Microsoft JVM Debugger   1.0
    Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
    
    Microsoft MI-Based Debugger   1.0
    Provides support for connecting Visual Studio to MI compatible debuggers
    
    Mono Debugging for Visual Studio   4.7.4-pre (c2d89eb)
    Support for debugging Mono processes with Visual Studio.
    
    NuGet Package Manager   4.4.0
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
    
    SQL Server Data Tools   15.1.61707.200
    Microsoft SQL Server Data Tools
    
    TypeScript   2.3.5.0
    TypeScript tools for Visual Studio
    
    Visual Studio Code Debug Adapter Host Package   1.0
    Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
    
    VisualStudio.IoT   1.0
    Package with IoT components for Visual Studio
    
    VisualStudio.Mac   1.0
    Mac Extension for Visual Studio
    
    Xamarin   4.7.10.38 (34c1b6c)
    Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
    
    Xamarin.Android SDK   8.0.2.1 (HEAD/c2a33d8ea)
    Xamarin.Android Reference Assemblies and MSBuild support.
    
    Xamarin.iOS and Xamarin.Mac SDK   11.3.0.47 (51128b8)
    Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
    
  • JonDouglasJonDouglas USXamarin Team, University, Developer Group Leader Xamurai

    @SpyrosBoutsis Thank you for the confirmation. I will be looking into a proper reproduction to see what's going on.

  • JonDouglasJonDouglas USXamarin Team, University, Developer Group Leader Xamurai

    @SpyrosBoutsis

    I have attempted to reproduce this using the same build as yourself and am unable to do so. After the consent screen, the account is properly added to the store. I will be getting more eyes on this issue momentarily.

Sign In or Register to comment.