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

Image is not getting Displayed. Spinner keeps on Loading #437

Closed
vinoopks opened this issue Aug 2, 2020 · 4 comments
Closed

Image is not getting Displayed. Spinner keeps on Loading #437

vinoopks opened this issue Aug 2, 2020 · 4 comments
Labels
status: needs more info We need more information before we can continue work on this issue.

Comments

@vinoopks
Copy link

vinoopks commented Aug 2, 2020

🐛 Bug Report

The image is not getting loaded using CachedNetworkImage, but Image.network call works without any issues.
I used the code from the official documentation.

import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';

class App extends StatelessWidget {
  const App({Key key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    final title = 'Cached Images';
    return MaterialApp(
      title: title,
      home: Scaffold(
        appBar: AppBar(
          title: Text(title),
        ),
        body: Center(
          child: CachedNetworkImage(
            placeholder: (context, url) => CircularProgressIndicator(),
            imageUrl: 'https://picsum.photos/250?image=9',
          ),
        ),
      ),
    );
  }
}

Observations- From Debug Console

First time load works as expected. But second time on wards getting the following issues.
E/flutter ( 7071): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method getTemporaryDirectory on channel plugins.flutter.io/path_provider)

E/flutter ( 7071): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method getDatabasesPath on channel com.tekartik.sqflite)

Progress spinner is spinning forever, I am not sure if this is some kind of configuration issue from my end.
But when I user Image.network(url), Images gets displayed as expected.

Configuration

Version: cached_network_image: ^2.2.0+1
[√] Flutter (Channel stable, v1.17.5, on Microsoft Windows [Version 10.0.19041.329], locale en-IN)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 4.0)
[√] VS Code (version 1.47.2)
[√] Connected device (1 available)
• No issues found!

@omidraha
Copy link

omidraha commented Aug 4, 2020

You need to reinstall the app, hot reloading not working at first installing.

@vinoopks
Copy link
Author

vinoopks commented Aug 5, 2020

@omidraha
Reinstalled the app. Still I was getting the same error.

I checked online for solutions, but none of them actually worked for me.
MainActivity.kt seemed to be normal

import io.flutter.embedding.android.FlutterActivity

class MainActivity: FlutterActivity() {
}

AndroidManifest.xml

 <meta-data
           android:name="flutterEmbedding"
           android:value="2" />
   </application>

@renefloor
Copy link
Contributor

@vinoopks what is the platform you have this error on?

@renefloor renefloor added the status: needs more info We need more information before we can continue work on this issue. label Oct 8, 2020
@oOSatyamOo
Copy link

  1. Install the latest dependency for cached_network_image:
  2. Stop the app if you are debugging or running
  3. Flutter clean
  4. Quite from IDE
  5. Reopen your IDE and run pub get
    6.Run the app/web/...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs more info We need more information before we can continue work on this issue.
Projects
None yet
Development

No branches or pull requests

4 participants