mapbox-unity-sdk icon indicating copy to clipboard operation
mapbox-unity-sdk copied to clipboard

Curl error 61 in editor with certain map features

Open KuraiAndras opened this issue 3 years ago • 17 comments

  • Unity version: 2021.1.3+
    • Scripting Runtime Version: Default
    • Scripting Backend: IL2CPP
    • Api Compatibility Level: .NET Standard 2.0
  • Mapbox SDK version: 2.1.1
  • The platform you're building to: Editor
  • A description of what you're trying to do:
    • Use additional map features, POI, or 3D buildings
  • Steps to recreate the bug if appropriate:
    • Try any sample scene in the editor which uses the mentioned map features
  • Links to your logs are also helpful: image

The error only occurs in the editor when using Unity versions newer than 2021.1.2. Curiously the error does not happen in build (WebGL). According the release notes of 2021.1.3 Unity updated UnityWebRequest's libCurl backend. After the update Microsoft Play Fab also experienced a similar issue.

I would try to fix this manually, but the error does not contain any stacktraces.

KuraiAndras avatar May 06 '21 13:05 KuraiAndras

Some problem here on Unity 2020.3.9 Curl error 61: Unrecognized content encoding type. libcurl understands identity content encodings.

No stack trace or anything else. Mapbox does not load new tile data.

Any help appreciated

janweigel avatar Jun 01 '21 12:06 janweigel

The issue arised since Unity 2020.2 I guess, it is due to an updated version of Curl not supporting whatever header value of 'Content-Encoding' is set to. I suggest that you debug the headers received from the WebRequest

MRKDaGods avatar Jun 01 '21 17:06 MRKDaGods

@brnkhy Please take a look at this

MRKDaGods avatar Jun 01 '21 17:06 MRKDaGods

Any update on this?

KuraiAndras avatar Jun 14 '21 15:06 KuraiAndras

The Problem still exists in Untity 2020.3.12 It's not possible to get new tiles without error in Editor. Could someone please take a look at this? Thanks

janweigel avatar Jun 19 '21 14:06 janweigel

Hey everyone, I finally had a chance to look into this. Problem is Unity editor is just dropping gzip packages automatically in certain versions (2020.3+ I think) and Mapbox servers are strictly gzip-only. I'm looking for a workaround but there probably will not be one. I found this on the other hand; https://issuetracker.unity3d.com/issues/unitywebrequest-fails-on-windows-if-gzip-compression-is-used

Information is very vague on that page but it claims fix is

Fixed in 2022.1.X
Fix In Review for 2019.4.X
Planned for 2020.3.X, 2021.1.X

So looks like Unity recognizes this as an issue/bug and it'll be fixed.

brnkhy avatar Jul 07 '21 08:07 brnkhy

I can confirm that this bug is not present until 2020.3.7f but seems to appear a few versions later based on the libcurl upgrade. So stick with this version to get rid of this issue combined with 2020.3 LTS . I will keep an eye on the changelog for 2020.3.x and leave an comment when the fix is integrated. It's a bit strange that the issuetracker is marking 2020.3.x as fixed which is definately not the case yet.

Markovicho avatar Aug 02 '21 07:08 Markovicho

This has been fixed in 2020.3.16f1. Unity editor now supports gzip and I can confirm that this error is gone.

gisinator avatar Aug 13 '21 14:08 gisinator

2021.1.16f1 is still bad :(

KuraiAndras avatar Aug 13 '21 15:08 KuraiAndras

@gisinator thx for the information. will check out the new version as soon as possible ! @KuraiAndras is the fix listed in the changelog for 2021.1.16f1 ? What features are you using which are not included in 2020 LTS ?

Markovicho avatar Aug 13 '21 15:08 Markovicho

To be honest not much. The thing is that we constantly keep our projects up to date with the latest Unity versions, to avoid the hassle when updating major versions. So far it have served us fine.

KuraiAndras avatar Aug 13 '21 16:08 KuraiAndras

It's a matter of taste. We are jumping also as early as possible to avoid large gaps between the versions. But for my taste stable to stable seems bit more reliable. Is everything else working fine regarding mapbox ?

Markovicho avatar Aug 13 '21 16:08 Markovicho

Well everything else is fine. We did have to do a few modifications to the source code to have better performance in WebGL but other than that it worked quite well.

KuraiAndras avatar Aug 13 '21 17:08 KuraiAndras

The fix landed in 2021.1.17, the editor works as expected 🎉

KuraiAndras avatar Aug 19 '21 11:08 KuraiAndras

@KuraiAndras awesome, thanks for letting us know!

2020.3.16f1 2021.1.17 seems good for now 👍

brnkhy avatar Aug 19 '21 11:08 brnkhy

I'm having the same problem. Unity 2021.1.15f1 Version. URP Project. 'Curl error 61: Unrecognized content encoding type. libcurl understands identity content encodings.'

how to fix it?? just version upgrade?? I will be glad for your help.

mingyu0403 avatar Aug 20 '21 00:08 mingyu0403

it works fine in (Unity 2021.1.17f1, Unity 2020.3.16f1) regardless of URP. oh yeeeeah!!

mingyu0403 avatar Aug 20 '21 02:08 mingyu0403