Kaiteki-Fedi / Kaiteki

The comfy SNS client for everything, everywhere
https://kaiteki.app
GNU Affero General Public License v3.0
488 stars 31 forks source link

Unexpected character #372

Open container1 opened 1 year ago

container1 commented 1 year ago

Error Type

FormatException

Error Message

FormatException: Unexpected character (at character 1)<!DOCTYPE html>^

Stack Trace

#0      _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1383)
#1      _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1250)
#2      _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:915)
#3      _parseJson (dart:convert-patch/convert_patch.dart:35)
#4      JsonDecoder.convert (dart:convert/json.dart:610)
#5      JsonCodec.decode (dart:convert/json.dart:216)
#6      jsonDecode (dart:convert/json.dart:155)
#7      KaitekiResponseExtensions.fromJson (package:kaiteki/http/extensions.dart:16)
#8      KaitekiJsonDeserializationResopnseExtensions.fromResponse (package:kaiteki/http/extensions.dart:28)
#9      KaitekiJsonDeserializationResopnseExtensions.fromResponse.<anonymous closure> (package:kaiteki/http/extensions.dart:28)
<asynchronous suspension>
#10     MastodonAdapter.getInstance (package:kaiteki/fediverse/backends/mastodon/adapter.dart:35)
<asynchronous suspension>
#11     _LoginScreenState._fetchInstance (package:kaiteki/ui/auth/login/login_screen.dart:310)
<asynchronous suspension>
#12     CancelableCompleter.complete.<anonymous closure> (package:async/src/cancelable_operation.dart:425)
<asynchronous suspension>

Additional information

Platform: Android (BV_BV9000Pro_F_V0.7_20190321) Version: Weekly 2023-21 (1684717747)

container1 commented 1 year ago

Trying new Version and in general looks great, but trying to login to c4.social still not possible with given result. Probably should/could be handled as "normal" Mastodon instance? As already stated, with Version 2023-07 worked fine.

container1 commented 1 year ago

Sorry for accidental closing! :-(

container1 commented 1 year ago

I played a bit around and installed/tested/deinstlled all versions and found, as of version 2023-18 no login to c4.social & pawoo.net is possible. With all versions before 18, login to c4.social & pawoo.net worked fine.

Craftplacer commented 1 year ago

Peeking around with curl, I am seeing that both instances seem to be running outdated Mastodon, which does not introduce /api/v2/instance yet. In this case I might have to do a fallback.