“Error while receiving image in the application using Firebase and Flutter.”

huangapple go评论74阅读模式
英文:

Error while reciving image in the application using firebase and flutter

问题

每当我尝试构建和运行此应用程序时,它会成功运行,但无法从Firebase数据库获取图像,并出现以下错误。我尝试使用Firebase插件,并在控制台中检查应用程序是否配置正确,但应用程序已正确连接,我可以创建用户并登录到应用程序,也可以上传照片,但无法接收它。

代码链接在这里:博客

英文:

whenever I try to build this app and run this app its runs successfully but unable to get images from firebase database and I get this error. i tried to use firebase plugins and checked in the console that the app is been configured or not but the app was connected correctly i can create user and login in the app also able to upload photo but unable to recive it

D/FlutterView(19804): Detaching from a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@daebe54
I/OpenGLRenderer(19804): Initialized EGL, version 1.4
D/OpenGLRenderer(19804): Swap behavior 1
W/RenderThread(19804): type=1400 audit(0.0:22544): avc: denied { search } for name="kgsl-3d0" dev="sysfs" ino=22816 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:sysfs_kgsl:s0 tclass=dir permissive=0
W/Adreno-ES20(19804): <get_gpu_clk:229>: open failed: errno 13
W/Adreno-EGL(19804): <qeglDrvAPI_eglGetConfigAttrib:612>: EGL_BAD_ATTRIBUTE
W/Adreno-EGL(19804): <qeglDrvAPI_eglGetConfigAttrib:612>: EGL_BAD_ATTRIBUTE
I/SurfaceView(19804): updateSystemUiVisibility, blackBackground = false, viewVisibility = 0, appBounds = Rect(0, 0 - 720, 1440), mScreenRect = Rect(0, 0 - 720, 1356), surface = io.flutter.embedding.android.FlutterSurfaceView{ff4c83e V.E...... ......ID 0,0-720,1356}
D/FlutterView(19804): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@daebe54
W/1.gpu   (19804): type=1400 audit(0.0:22545): avc: denied { search } for name="kgsl-3d0" dev="sysfs" ino=22816 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:sysfs_kgsl:s0 tclass=dir permissive=0
W/Adreno-ES20(19804): <get_gpu_clk:229>: open failed: errno 13
W/Adreno-EGL(19804): <qeglDrvAPI_eglGetConfigAttrib:612>: EGL_BAD_ATTRIBUTE
W/Adreno-EGL(19804): <qeglDrvAPI_eglGetConfigAttrib:612>: EGL_BAD_ATTRIBUTE
I/flutter (19804): Image Url: https://firebasestorage.googleapis.com/v0/b/blog-8c8f3.appspot.com/o/Post%20Image%2F2019-12-31%2003%3A09%3A37.024688.jpg?alt=media&token=0cf6ac7c-a2cd-4e7b-b85c-da21d8f3488c
I/flutter (19804): Length: [Instance of 'Posts'].length

[38;5;248m════════ Exception caught by widgets library ═══════════════════════════════════[39;49m
[38;5;244mThe following assertion was thrown building:[39;49m
'package:flutter/src/painting/_network_image_io.dart': Failed assertion: line 22 pos 14: 'url != null': is not true.


[38;5;248mEither the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md
[39;49m

[38;5;244mWhen the exception was thrown, this was the stack[39;49m
[38;5;244m#2      new NetworkImage[39;49m
[38;5;244m#3      new Image.network[39;49m
[38;5;248m#4      _HomePageState.postsUI[39;49m
[38;5;248m#5      _HomePageState.build.<anonymous closure>[39;49m
[38;5;244m#6      SliverChildBuilderDelegate.build[39;49m
[38;5;244m...[39;49m
[38;5;248m════════════════════════════════════════════════════════════════════════════════[39;49m

[38;5;248m════════ Exception caught by widgets library ═══════════════════════════════════[39;49m
[38;5;244mThe following assertion was thrown building:[39;49m
'package:flutter/src/painting/_network_image_io.dart': Failed assertion: line 22 pos 14: 'url != null': is not true.


[38;5;248mEither the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md
[39;49m

[38;5;244mWhen the exception was thrown, this was the stack[39;49m
[38;5;244m#2      new NetworkImage[39;49m
[38;5;244m#3      new Image.network[39;49m
[38;5;248m#4      _HomePageState.postsUI[39;49m
[38;5;248m#5      _HomePageState.build.<anonymous closure>[39;49m
[38;5;244m#6      SliverChildBuilderDelegate.build[39;49m
[38;5;244m...[39;49m
[38;5;248m════════════════════════════════════════════════════════════════════════════════

here is my code link blog

答案1

得分: 3

你犯了一个错误,请将“images”替换为“image”。

DATA[individualKey]["image"],
DATA[individualKey]["description"],
DATA[individualKey]["date"],
DATA[individualKey]["time"],

英文:

You made an error replace "images" with "image"

 DATA[individualKey]["image"],
 DATA[individualKey]["description"],
 DATA[individualKey]["date"],
 DATA[individualKey]["time"],

huangapple
  • 本文由 发表于 2020年1月4日 00:05:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/59581698.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定