Skip to content
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

Suddenly System.Data.SqlClient is not supported on this platform #5095

Closed
trailmax opened this issue Oct 17, 2019 · 5 comments
Closed

Suddenly System.Data.SqlClient is not supported on this platform #5095

trailmax opened this issue Oct 17, 2019 · 5 comments

Comments

@trailmax
Copy link

App has been deployed and running without issues for a year. Suddenly this morning I was presented with a pile of System.Data.SqlClient is not supported on this platform exceptions.
There were no deployments or any other updates to the app since Oct 2018.
What happened and why?

Investigative information

Please provide the following:

  • Timestamp: First error at 10/16/2019, 7:08:00.104 PM UTC, previous successful run at 10/16/2019, 6:47:20.901 PM
  • Function App version (1.0 or 2.0): V2
  • Function App name: OnboardFunctions
  • Function name(s) (as appropriate): RetrieveNotifications
  • Invocation ID: 0f72b607-b2c9-415c-81db-25ab9260bb29
  • Region: North Europe

Repro steps

Here is csproj that worked for a year:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <AzureFunctionsVersion>v2</AzureFunctionsVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Auth0.ManagementApi" Version="5.10.0" />
    <PackageReference Include="Dapper" Version="1.50.5" />
    <PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" version="3.0.0" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.1.1" />
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.22" />
  </ItemGroup>
  <ItemGroup>
    <None Update="host.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="local.settings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <CopyToPublishDirectory>Never</CopyToPublishDirectory>
    </None>
  </ItemGroup>
</Project>

Provide the steps required to reproduce the problem:

It Exceptions appeared after I presumve some update of Azure Functions platform at about 7pm on 10th of Oct 2019

Expected behavior

Keep working without my involvement.

Known workarounds

Directly installing <PackageReference Include="System.Data.SqlClient" Version="4.6.1" /> did the trick along with update to netcoreapp2.2 (but I suspect the latter may not be related).

@graham-saunders
Copy link

graham-saunders commented Oct 17, 2019

I'm seeing this same issue in my production environment which is greatly impacting clients.

Investigative information
Please provide the following:

  • Timestamp: First error at 2019-10-17T00:00:00.0458362+00:0, previous successful run at 2019-10-16T00:00:00.0458362+00:0
  • Function App version (1.0 or 2.0): V2
  • Function App name: virtuousgivingjobsprod
  • Function name(s) (as appropriate): DonationDailyAlert, EnqueueRecurringDonationProcessing
  • Invocation ID: 084c9f92-d3c8-458a-9bd5-a09de0f8c9ab
  • Region: West US

Edit: I've pinned my function runtime to ~2 and that has resolved these issues.

@marc-wilson
Copy link

I am having a similar issue. Azure/Azure-Functions#1370

@alveflo
Copy link

alveflo commented Oct 22, 2019

We're facing the exact same issue. Suddenly we're getting System.Data.SqlClient is not supported on this platform. but when running netcoreapp2.2.

Edit: I've pinned my function runtime to ~2 as well and that has resolved the issue for me too. Thanks @graham-saunders

@fabiocav
Copy link
Member

Thank you for reporting this.

For the cases described above, was there a re-deployment of the payload?

@alveflo and @graham-saunders can you clarify what you mean when you say that you've pinned to ~2? What version reference did you have before? Was it something like latest, beta (@trailmax , looks like that's what your application was using) or something like that?

~2 is the correct version to use if you're running on 2.0. This will make sure you're targeting a stable set of updates within that major version.

For applications using unstable version references like the one mentioned above, what happened is that you ended up getting a major version update for Azure Functions 3.0, which introduced that issue for you.

We've posted this announcement a little while ago: Azure/app-service-announcements#207

Please subscribe to that repository, if you haven't yet, as we'll continue to use that for similar communication in the future.

@trailmax
Copy link
Author

@fabiocav Changing to ~2 was one of the first things we have tried, but that did not fix the problem (maybe we did not wait long enough for the rollback from beta)

I've seen the Azure Functions 3.0 announcement, but could not predict the issue it would cause. However being on beta (which we totally did not realise until the issue came up) kinda suggests the breaking should happen.

Anyway, thank you for the clarification, we shall be more careful with early releases channels for production code.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants