fresco icon indicating copy to clipboard operation
fresco copied to clipboard

same image url, 0.6.0 & 0.5.3 can't download, but 0.5.2 can.

Open lizhiqiang-unnoo opened this issue 11 years ago • 11 comments

url: http://test.file.xiaomiquan.com/201506/8111f35817f2edbeb31c15f8c0719f5797fc949db6b4d7a200940fdd162ef8e6.png

lizhiqiang-unnoo avatar Jul 09 '15 03:07 lizhiqiang-unnoo

We tested it and the image loads for us. Can you give us more context? Are you sure that it is Fresco and not a networking issue for example? If you turn on verbose logging, what do you get for AbstractControllerListener in your logcat?

plamenko avatar Jul 09 '15 09:07 plamenko

you mean verbose logcat? or some method to turn on fresco's logging function?

Here is the verbose logcat from my dev device for about 6 secs after my GalleryActivity(ViewPager & ZoomableDraweeViews from fresco sample project) launched.

07-10 16:07:10.468 846-1880/? I/ActivityManager﹕ START u0 {cmp=com.unnoo.xiaomiquan/.activities.GalleryActivity (has extras)} from uid 10192 on display 0 07-10 16:07:10.475 846-1880/? V/WindowManager﹕ addAppToken: AppWindowToken{1367950 token=Token{321f313 ActivityRecord{35b9fe02 u0 com.unnoo.xiaomiquan/.activities.GalleryActivity t4276}}} to stack=1 task=4276 at 2 07-10 16:07:10.479 358-1012/? D/audio_hw_primary﹕ out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=2 07-10 16:07:10.491 358-839/? D/audio_hw_primary﹕ select_devices: out_snd_device(2: speaker) in_snd_device(0: none) 07-10 16:07:10.491 358-839/? D/msm8974_platform﹕ platform_send_audio_calibration: sending audio calibration for snd_device(2) acdb_id(15) 07-10 16:07:10.491 358-839/? E/ACDB-LOADER﹕ Error: ACDB AFE returned = -19 07-10 16:07:10.491 358-839/? D/audio_hw_primary﹕ enable_snd_device: snd_device(2: speaker) 07-10 16:07:10.493 358-839/? D/audio_hw_primary﹕ enable_audio_route: apply and update mixer path: low-latency-playback speaker 07-10 16:07:10.527 18421-18421/com.unnoo.xiaomiquan I/AppCompatViewInflater﹕ app:theme is now deprecated. Please move to using android:theme instead. 07-10 16:07:10.549 846-1889/? V/WindowManager﹕ Adding window Window{3ccdf84e u0 com.unnoo.xiaomiquan/com.unnoo.xiaomiquan.activities.GalleryActivity} at 14 of 20 (after Window{20aa3cd5 u0 com.unnoo.xiaomiquan/com.unnoo.xiaomiquan.activities.GroupActivity}) 07-10 16:07:10.663 846-922/? I/ActivityManager﹕ Displayed com.unnoo.xiaomiquan/.activities.GalleryActivity: +156ms 07-10 16:07:10.910 18421-18421/com.unnoo.xiaomiquan D/ViewRootImpl﹕ changeCanvasOpacity: opaque=true 07-10 16:07:12.561 18421-18421/com.unnoo.xiaomiquan D/ViewRootImpl﹕ changeCanvasOpacity: opaque=false 07-10 16:07:13.716 358-1012/? D/audio_hw_primary﹕ disable_audio_route: reset and update mixer path: low-latency-playback speaker 07-10 16:07:13.717 358-1012/? D/audio_hw_primary﹕ disable_snd_device: snd_device(2: speaker) 07-10 16:07:16.618 846-1009/? E/WifiStateMachine﹕ WifiStateMachine CMD_START_SCAN source -2 txSuccessRate=10.55 rxSuccessRate=23.39 targetRoamBSSID=any RSSI=-58 07-10 16:07:16.618 846-1009/? E/WifiStateMachine﹕ WifiStateMachine starting scan for "Unnoo-5.0G"WPA_PSK with 5745

lizhiqiang-unnoo avatar Jul 10 '15 09:07 lizhiqiang-unnoo

Freco almost never print log to logcat, even load failed. Is there any method to turn on inner logging of fresco?

lizhiqiang-unnoo avatar Jul 10 '15 09:07 lizhiqiang-unnoo

You need to grep for what you are looking for, the whole logcat output is useless otherwise. Can you do adb logcat -v threadtime | grep -iE 'LoggingListener|AbstractDraweeController'?

plamenko avatar Jul 10 '15 12:07 plamenko

no log captured using your command line.

Here is my code snippet:

ZoomableDraweeView imageView = (ZoomableDraweeView) root.findViewById(R.id.zdv_image);
DraweeController ctrl = Fresco.newDraweeControllerBuilder()
            .setUri(Uri.parse(image.getUrl()))
            .setControllerListener(new BaseControllerListener<ImageInfo>() {
                @Override
                public void onSubmit(String id, Object callerContext) {
                    ...
                }

                @Override
                public void onFinalImageSet(String id, ImageInfo imageInfo, Animatable animatable) {
                    ...
                }

                @Override
                public void onIntermediateImageSet(String id, ImageInfo imageInfo) {
                    ...
                }

                @Override
                public void onIntermediateImageFailed(String id, Throwable throwable) {
                    ...
                }

                @Override
                public void onFailure(String id, Throwable throwable) {
                    ...
                }

                @Override
                public void onRelease(String id) {
                    ...
                }
            })
            .build();
imageView.setController(ctrl);

I set breakpoints at every callback, none of them breaked.

lizhiqiang-unnoo avatar Jul 10 '15 13:07 lizhiqiang-unnoo

Have you set the logging level for your application to VERBOSE? I think the default logging level is WARN. You should be getting something like this:

07-09 16:23:38.934 17755 17755 V myapp(:<default>):AbstractDraweeController: controller 33531f16 140: submitRequest: dataSource: 22fdfb9e

plamenko avatar Jul 10 '15 13:07 plamenko

adb shell setprop  log.tag.ZoomableDraweeView  DEBUG
adb shell setprop  log.tag.AbstractDraweeController  DEBUG
adb shell setprop  log.tag.LoggingListener  DEBUG
adb logcat -v threadtime | grep -iE 'LoggingListener|AbstractDraweeController'

still no log printed.

Thanks for your patient, plamenko.

lizhiqiang-unnoo avatar Jul 10 '15 13:07 lizhiqiang-unnoo

VERBOSE, not DEBUG.

tyronen avatar Jul 15 '15 17:07 tyronen

Hi, tyroneon.

I have added this snippet in my Application.onCreate before Fresco.initialize():

System.setProperty("log.tag.AbstractDraweeController", "VERBOSE");
System.setProperty("log.tag.LoggingListener", "VERBOSE");
System.setProperty("log.tag.ZoomableDraweeView", "VERBOSE");

Log.e(TAG, "log.tag.AbstractDraweeController=" + System.getProperty("log.tag.AbstractDraweeController"));
Log.e(TAG, "log.tag.LoggingListener=" + System.getProperty("log.tag.LoggingListener"));
Log.e(TAG, "log.tag.ZoomableDraweeView=" + System.getProperty("log.tag.ZoomableDraweeView"));

The logcat prints:

    07-21 15:34:22.689  21993-21993/ E/App﹕ log.tag.AbstractDraweeController=VERBOSE
    07-21 15:34:22.689  21993-21993/ E/App﹕ log.tag.LoggingListener=VERBOSE
    07-21 15:34:22.689  21993-21993/ E/App﹕ log.tag.ZoomableDraweeView=VERBOSE

Then I input command:

adb logcat -v threadtime | grep -iE 'ZoomableDraweeView|LoggingListener|AbstractDraweeController'

No log captured.

Fresco version: 0.6.0, and ZoomableDraweeView in the sample directory.

lizhiqiang-unnoo avatar Jul 21 '15 07:07 lizhiqiang-unnoo

Another problem:

I get these errors in logcat:

07-21 15:34:24.016  21993-22159/ E/JHEAD﹕ can't open '/cover_background/2.png'
07-21 15:34:24.018  21993-22157/ E/JHEAD﹕ can't open '/cover_background/8.png'
07-21 15:34:24.018  21993-22157/ E/JHEAD﹕ can't open '/cover_background/9.png'
07-21 15:34:24.059  21993-22157/ E/JHEAD﹕ can't open '/cover_background/1.png'
07-21 15:34:24.080  21993-22157/ E/JHEAD﹕ can't open '/cover_background/5.png'
07-21 15:34:24.089  21993-22157/ E/JHEAD﹕ can't open '/cover_background/3.png'
07-21 15:34:24.091  21993-22159/ E/JHEAD﹕ can't open '/cover_background/6.png'

But all the images show correctly.

Is the log printed by fresco?

lizhiqiang-unnoo avatar Jul 21 '15 07:07 lizhiqiang-unnoo

We've added log setup instructions here: http://frescolib.org/docs/troubleshooting.html#using-the-logcat

tyronen avatar Sep 23 '15 14:09 tyronen