neffex97 / Tiwee

IPTV player
GNU General Public License v3.0
209 stars 81 forks source link

Not parsing data on startup #9

Open spacie2136 opened 1 year ago

spacie2136 commented 1 year ago

Hi, first of all let me say i never used flutter nor dart. So im still lost in your code (well written btw.!).

I managed to set up everything but the app hangs on startup with this message:

I/flutter (30368): type 'String' is not a subtype of type 'Map<String, dynamic>' E/flutter (30368): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value E/flutter (30368): #0 categoryProvider.. (package:Tiwee/business_logic/provider/categoryprovider.dart:23:39)

Im not sure, but it seems to me there is a mismatch in the JSON format from the pulled API and the internal objects!? (Absolutly not sure!) I placed a try block over the for loop (just for testing) and managed to get the app running. But without any channels :-(

I'll be digging into it, but im still very lost as i said ;-) Do you maybe have an easy solution for this issue?

Z0pyrus commented 1 year ago

I'm currently investigating as well. For me, it looks like the countries are providing only one country which means it fails there.

Z0pyrus commented 1 year ago

Apparently, this app uses an older API version that is not online anymore. Many Endpoints have changed, and the app could be rewritten.

neffex97 commented 1 year ago

Hello, @spacie2136 @Z0pyrus sorry for the late response... this error is from APi as I used free API sometimes it does not respond correctly and returns empty data, as I find some free time I will refactor the code to handle errors better than past, meanwhile, ill appreciate any pull request from the community

tbukah commented 1 year ago

Where I can write new API inside file code source app