rozdoum / social-app-android

Build your social app for Android with the code template that includes the following key features for social networks as likes, comments, posts, image uploads, etc.
Apache License 2.0
450 stars 266 forks source link

Follow post not working #73

Closed WilVod closed 4 years ago

WilVod commented 5 years ago

When you click on the 🌟 icon it does not display posts. It just shows the default layout with text "Follow someone to see his new posts"

WilVod commented 5 years ago

screenshot_20190219-064417 screenshot_20190219-064425 storage storage storage images

WilVod commented 5 years ago

As you can see everything is correctly set up in firebase console and created there. Normal posts also display. But when you click on the * icon to see posts of people you are following it is empty.

WilVod commented 5 years ago

2019-02-19 07:01:29.645 5893-5893/com.natureai.animalyard V/FA: onActivityCreated 2019-02-19 07:01:29.659 5893-5893/com.natureai.animalyard D/TextView: setTypeface with style : 0 2019-02-19 07:01:29.669 5893-5893/com.natureai.animalyard D/TextView: setTypeface with style : 0 2019-02-19 07:01:29.669 5893-5893/com.natureai.animalyard D/TextView: setTypeface with style : 0 2019-02-19 07:01:29.677 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: ThreadedRenderer.create() translucent=false 2019-02-19 07:01:29.680 5893-9872/com.natureai.animalyard D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=MainActivity, firebase_previous_id(_pi)=7013078036792929320, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=7013078036792929327}] 2019-02-19 07:01:29.680 5893-5893/com.natureai.animalyard D/InputTransport: Input channel constructed: fd=84 2019-02-19 07:01:29.680 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: setView = DecorView@5186c17[MainActivity] touchMode=true 2019-02-19 07:01:29.682 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: dispatchAttachedToWindow 2019-02-19 07:01:29.690 5893-9872/com.natureai.animalyard V/FA: Connecting to remote service 2019-02-19 07:01:29.692 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: Relayout returned: oldFrame=[0,0][0,0] newFrame=[0,0][1440,2560] result=0x7 surface={isValid=true 534732187136} surfaceGenerationChanged=true 2019-02-19 07:01:29.693 5893-9872/com.natureai.animalyard V/FA: Connection attempt already in progress 2019-02-19 07:01:29.693 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: mHardwareRenderer.initialize() mSurface={isValid=true 534732187136} hwInitialized=true 2019-02-19 07:01:29.693 5893-9872/com.natureai.animalyard V/FA: Activity resumed, time: 470033566 2019-02-19 07:01:29.697 5893-5989/com.natureai.animalyard D/mali_winsys: EGLint new_window_surface(egl_winsys_display, void, EGLSurface, EGLConfig, egl_winsys_surface*, egl_color_buffer_format, EGLBoolean) returns 0x3000, [1440x2560]-format:1 2019-02-19 07:01:29.709 5893-5893/com.natureai.animalyard D/TextView: setTypeface with style : 0 2019-02-19 07:01:29.712 5893-5893/com.natureai.animalyard D/TextView: setTypeface with style : 0 2019-02-19 07:01:29.714 5893-5893/com.natureai.animalyard D/TextView: setTypeface with style : 0 2019-02-19 07:01:29.715 5893-5893/com.natureai.animalyard D/TextView: setTypeface with style : 0 2019-02-19 07:01:29.716 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1 2019-02-19 07:01:29.718 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: MSG_WINDOW_FOCUSCHANGED 1 2019-02-19 07:01:29.718 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: mHardwareRenderer.initializeIfNeeded()#2 mSurface={isValid=true 534732187136} 2019-02-19 07:01:29.719 5893-5893/com.natureai.animalyard V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@990e97a nm : com.natureai.animalyard ic=null 2019-02-19 07:01:29.719 5893-5893/com.natureai.animalyard I/InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus 2019-02-19 07:01:29.720 5893-5893/com.natureai.animalyard D/InputTransport: Input channel constructed: fd=88 2019-02-19 07:01:29.751 5893-9930/com.natureai.animalyard I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 2019-02-19 07:01:29.751 5893-9930/com.natureai.animalyard I/System.out: (HTTPLog)-Static: isSBSettingEnabled false 2019-02-19 07:01:29.766 5893-9872/com.natureai.animalyard D/FA: Connected to remote service 2019-02-19 07:01:29.766 5893-9872/com.natureai.animalyard V/FA: Processing queued up service tasks: 2 2019-02-19 07:01:31.190 5893-9930/com.natureai.animalyard D/StreamDownloadTask: Initial opening of Stream failed java.io.IOException: Could not open resulting stream. at com.google.firebase.storage.StreamDownloadTask.createDownloadStream(com.google.firebase:firebase-storage@@16.0.5:143) at com.google.firebase.storage.StreamDownloadTask.access$000(com.google.firebase:firebase-storage@@16.0.5:38) at com.google.firebase.storage.StreamDownloadTask$1.call(com.google.firebase:firebase-storage@@16.0.5:165) at com.google.firebase.storage.StreamDownloadTask$1.call(com.google.firebase:firebase-storage@@16.0.5:162) at com.google.firebase.storage.StreamDownloadTask$StreamProgressWrapper.ensureStream(com.google.firebase:firebase-storage@@16.0.5:324) at com.google.firebase.storage.StreamDownloadTask$StreamProgressWrapper.access$100(com.google.firebase:firebase-storage@@16.0.5:261) at com.google.firebase.storage.StreamDownloadTask.run(com.google.firebase:firebase-storage@@16.0.5:173) at com.google.firebase.storage.StorageTask.lambda$getRunnable$7(com.google.firebase:firebase-storage@@16.0.5:1106) at com.google.firebase.storage.StorageTask$$Lambda$12.run(com.google.firebase:firebase-storage@@16.0.5) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:762) 2019-02-19 07:01:31.191 5893-9930/com.natureai.animalyard E/StorageException: StorageException has occurred. Object does not exist at location. Code: -13010 HttpResult: 404 2019-02-19 07:01:31.193 5893-9930/com.natureai.animalyard E/StorageException: Could not open resulting stream. java.io.IOException: Could not open resulting stream. at com.google.firebase.storage.StreamDownloadTask.createDownloadStream(com.google.firebase:firebase-storage@@16.0.5:143) at com.google.firebase.storage.StreamDownloadTask.access$000(com.google.firebase:firebase-storage@@16.0.5:38) at com.google.firebase.storage.StreamDownloadTask$1.call(com.google.firebase:firebase-storage@@16.0.5:165) at com.google.firebase.storage.StreamDownloadTask$1.call(com.google.firebase:firebase-storage@@16.0.5:162) at com.google.firebase.storage.StreamDownloadTask$StreamProgressWrapper.ensureStream(com.google.firebase:firebase-storage@@16.0.5:324) at com.google.firebase.storage.StreamDownloadTask$StreamProgressWrapper.access$100(com.google.firebase:firebase-storage@@16.0.5:261) at com.google.firebase.storage.StreamDownloadTask.run(com.google.firebase:firebase-storage@@16.0.5:173) at com.google.firebase.storage.StorageTask.lambda$getRunnable$7(com.google.firebase:firebase-storage@@16.0.5:1106) at com.google.firebase.storage.StorageTask$$Lambda$12.run(com.google.firebase:firebase-storage@@16.0.5) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:762) 2019-02-19 07:01:31.194 5893-9930/com.natureai.animalyard E/StorageException: StorageException has occurred. Object does not exist at location. Code: -13010 HttpResult: 404 2019-02-19 07:01:31.197 5893-9930/com.natureai.animalyard E/StorageException: Could not open resulting stream. java.io.IOException: Could not open resulting stream. at com.google.firebase.storage.StreamDownloadTask.createDownloadStream(com.google.firebase:firebase-storage@@16.0.5:143) at com.google.firebase.storage.StreamDownloadTask.access$000(com.google.firebase:firebase-storage@@16.0.5:38) at com.google.firebase.storage.StreamDownloadTask$1.call(com.google.firebase:firebase-storage@@16.0.5:165) at com.google.firebase.storage.StreamDownloadTask$1.call(com.google.firebase:firebase-storage@@16.0.5:162) at com.google.firebase.storage.StreamDownloadTask$StreamProgressWrapper.ensureStream(com.google.firebase:firebase-storage@@16.0.5:324) at com.google.firebase.storage.StreamDownloadTask$StreamProgressWrapper.access$100(com.google.firebase:firebase-storage@@16.0.5:261) at com.google.firebase.storage.StreamDownloadTask.run(com.google.firebase:firebase-storage@@16.0.5:173) at com.google.firebase.storage.StorageTask.lambda$getRunnable$7(com.google.firebase:firebase-storage@@16.0.5:1106) at com.google.firebase.storage.StorageTask$$Lambda$12.run(com.google.firebase:firebase-storage@@16.0.5) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:762) 2019-02-19 07:01:31.205 5893-5893/com.natureai.animalyard W/Glide: Load failed for gs://animalyard-eb2e1.appspot.com/images/medium/post-LZ1GPJlHw1ZKquSszgF_1550521315041 with size [1440x1000] class com.bumptech.glide.load.engine.GlideException: Failed to load resource There was 1 cause: com.google.firebase.storage.StorageException(Object does not exist at location.) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE There was 1 cause: com.google.firebase.storage.StorageException(Object does not exist at location.) call GlideException#logRootCauses(String) for more detail Cause (1 of 1): class com.google.firebase.storage.StorageException: Object does not exist at location. 2019-02-19 07:01:31.210 5893-5893/com.natureai.animalyard I/Glide: Root cause (1 of 1) com.google.firebase.storage.StorageException: Object does not exist at location. at com.google.firebase.storage.StreamDownloadTask.snapStateImpl(com.google.firebase:firebase-storage@@16.0.5:227) at com.google.firebase.storage.StreamDownloadTask.snapStateImpl(com.google.firebase:firebase-storage@@16.0.5:36) at com.google.firebase.storage.StorageTask.snapState(com.google.firebase:firebase-storage@@16.0.5:354) at com.google.firebase.storage.TaskListenerImpl.onInternalStateChanged(com.google.firebase:firebase-storage@@16.0.5:89) at com.google.firebase.storage.StorageTask.tryChangeState(com.google.firebase:firebase-storage@@16.0.5:400) at com.google.firebase.storage.StorageTask.tryChangeState(com.google.firebase:firebase-storage@@16.0.5:436) at com.google.firebase.storage.StreamDownloadTask.run(com.google.firebase:firebase-storage@@16.0.5:199) at com.google.firebase.storage.StorageTask.lambda$getRunnable$7(com.google.firebase:firebase-storage@@16.0.5:1106) at com.google.firebase.storage.StorageTask$$Lambda$12.run(com.google.firebase:firebase-storage@@16.0.5) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:762) Caused by: java.io.IOException: Could not open resulting stream. at com.google.firebase.storage.StreamDownloadTask.createDownloadStream(com.google.firebase:firebase-storage@@16.0.5:143) at com.google.firebase.storage.StreamDownloadTask.access$000(com.google.firebase:firebase-storage@@16.0.5:38) at com.google.firebase.storage.StreamDownloadTask$1.call(com.google.firebase:firebase-storage@@16.0.5:165) at com.google.firebase.storage.StreamDownloadTask$1.call(com.google.firebase:firebase-storage@@16.0.5:162) at com.google.firebase.storage.StreamDownloadTask$StreamProgressWrapper.ensureStream(com.google.firebase:firebase-storage@@16.0.5:324) at com.google.firebase.storage.StreamDownloadTask$StreamProgressWrapper.access$100(com.google.firebase:firebase-storage@@16.0.5:261) at com.google.firebase.storage.StreamDownloadTask.run(com.google.firebase:firebase-storage@@16.0.5:173) at com.google.firebase.storage.StorageTask.lambda$getRunnable$7(com.google.firebase:firebase-storage@@16.0.5:1106)  at com.google.firebase.storage.StorageTask$$Lambda$12.run(com.google.firebase:firebase-storage@@16.0.5)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)  at java.lang.Thread.run(Thread.java:762)  2019-02-19 07:01:34.794 5893-9872/com.natureai.animalyard V/FA: Inactivity, disconnecting from the service 2019-02-19 07:01:42.449 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: ViewPostImeInputStage processPointer 0 2019-02-19 07:01:42.605 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: ViewPostImeInputStage processPointer 1 2019-02-19 07:01:42.628 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0 2019-02-19 07:01:42.631 5893-9872/com.natureai.animalyard V/FA: Recording user engagement, ms: 12956 2019-02-19 07:01:42.631 5893-9872/com.natureai.animalyard V/FA: Connecting to remote service 2019-02-19 07:01:42.641 5893-9872/com.natureai.animalyard V/FA: Activity paused, time: 470046522 2019-02-19 07:01:42.645 5893-9872/com.natureai.animalyard D/FA: Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=12956, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=7013078036792929327}] 2019-02-19 07:01:42.650 5893-5893/com.natureai.animalyard V/FA: onActivityCreated 2019-02-19 07:01:42.660 5893-9872/com.natureai.animalyard V/FA: Connection attempt already in progress 2019-02-19 07:01:42.670 5893-5893/com.natureai.animalyard D/TextView: setTypeface with style : 0 2019-02-19 07:01:42.670 5893-5893/com.natureai.animalyard D/TextView: setTypeface with style : 0 2019-02-19 07:01:42.683 5893-9872/com.natureai.animalyard D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_previous_class(_pc)=MainActivity, firebase_previous_id(_pi)=7013078036792929327, firebase_screen_class(_sc)=FollowingPostsActivity, firebase_screen_id(_si)=7013078036792929328}] 2019-02-19 07:01:42.683 5893-5893/com.natureai.animalyard D/ViewRootImpl@eaeca73[FollowingPostsActivity]: ThreadedRenderer.create() translucent=false 2019-02-19 07:01:42.686 5893-5893/com.natureai.animalyard D/InputTransport: Input channel constructed: fd=86 2019-02-19 07:01:42.686 5893-5893/com.natureai.animalyard D/ViewRootImpl@eaeca73[FollowingPostsActivity]: setView = DecorView@f6cbf2e[FollowingPostsActivity] touchMode=true 2019-02-19 07:01:42.693 5893-5893/com.natureai.animalyard D/ViewRootImpl@eaeca73[FollowingPostsActivity]: dispatchAttachedToWindow 2019-02-19 07:01:42.699 5893-9872/com.natureai.animalyard V/FA: Connection attempt already in progress 2019-02-19 07:01:42.699 5893-9872/com.natureai.animalyard V/FA: Connection attempt already in progress 2019-02-19 07:01:42.700 5893-9872/com.natureai.animalyard V/FA: Activity resumed, time: 470046571 2019-02-19 07:01:42.711 5893-5893/com.natureai.animalyard D/ViewRootImpl@eaeca73[FollowingPostsActivity]: Relayout returned: oldFrame=[0,0][0,0] newFrame=[0,0][1440,2560] result=0x27 surface={isValid=true 534200221696} surfaceGenerationChanged=true 2019-02-19 07:01:42.712 5893-5893/com.natureai.animalyard D/ViewRootImpl@eaeca73[FollowingPostsActivity]: mHardwareRenderer.initialize() mSurface={isValid=true 534200221696} hwInitialized=true 2019-02-19 07:01:42.717 5893-5989/com.natureai.animalyard D/mali_winsys: EGLint new_window_surface(egl_winsys_display, void, EGLSurface, EGLConfig, egl_winsys_surface*, egl_color_buffer_format, EGLBoolean) returns 0x3000, [1440x2560]-format:1 2019-02-19 07:01:42.763 5893-5893/com.natureai.animalyard D/ViewRootImpl@eaeca73[FollowingPostsActivity]: MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1 2019-02-19 07:01:42.763 5893-5893/com.natureai.animalyard D/ViewRootImpl@eaeca73[FollowingPostsActivity]: MSG_WINDOW_FOCUS_CHANGED 1 2019-02-19 07:01:42.764 5893-5893/com.natureai.animalyard D/ViewRootImpl@eaeca73[FollowingPostsActivity]: mHardwareRenderer.initializeIfNeeded()#2 mSurface={isValid=true 534200221696} 2019-02-19 07:01:42.765 5893-5893/com.natureai.animalyard V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@d65b248 nm : com.natureai.animalyard ic=null 2019-02-19 07:01:42.765 5893-5893/com.natureai.animalyard I/InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus 2019-02-19 07:01:42.771 5893-5893/com.natureai.animalyard D/InputTransport: Input channel constructed: fd=101 2019-02-19 07:01:42.772 5893-5893/com.natureai.animalyard D/InputTransport: Input channel destroyed: fd=88 2019-02-19 07:01:42.773 5893-9872/com.natureai.animalyard D/FA: Connected to remote service 2019-02-19 07:01:42.773 5893-9872/com.natureai.animalyard V/FA: Processing queued up service tasks: 4 2019-02-19 07:01:42.818 5893-5989/com.natureai.animalyard D/OpenGLRenderer: endAllActiveAnimators on 0x7c60a34800 (RippleDrawable) with handle 0x7c4454ee80 2019-02-19 07:01:42.818 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: mHardwareRenderer.destroy()#1 2019-02-19 07:01:42.823 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: Relayout returned: oldFrame=[0,0][1440,2560] newFrame=[0,0][1440,2560] result=0x5 surface={isValid=false 0} surfaceGenerationChanged=true 2019-02-19 07:01:43.199 5893-5893/com.natureai.animalyard D/ViewRootImpl@8f26896[MainActivity]: Relayout returned: oldFrame=[0,0][1440,2560] newFrame=[0,0][1440,2560] result=0x5 surface={isValid=false 0} surfaceGenerationChanged=false

Batishev-Rozdoum commented 5 years ago

Hi @WilVod ! Thank you for interest to our project! The functionality of star2 is displaying only NEW posts of users you are following. That means only posts which were created after subscription will be displayed on this screen. If you still has has this issue feel free to inform us.

WilVod commented 5 years ago

Hi @Batishev-Rozdoum @rozdoum ,

Thank you for your reply. Even posts after subscription does not work.

Tried it multiple times with NEW posts and could not get it to work.

Batishev-Rozdoum commented 5 years ago

Did you try to refresh this page (swipe down)?

WilVod commented 5 years ago

Hi @Batishev-Rozdoum @rozdoum ,

Yes. Tried that multiple times and it did not work.

Could this be the issue (see logs posted above) >>>>>>>>>>>

2019-02-19 07:01:31.210 5893-5893/com.natureai.animalyard I/Glide: Root cause (1 of 1) com.google.firebase.storage.StorageException: Object does not exist at location

Batishev-Rozdoum commented 5 years ago

@WilVod do you have this field in database? 1550581476213

Maybe you have some problems with cloud function "addNewPostToFollowers". This function is required to the following feature. Check it please.

WilVod commented 5 years ago

Hi @Batishev-Rozdoum @rozdoum,

Dont have it. Is there anyway I can fix it?

Batishev-Rozdoum commented 5 years ago

Yes, sure. You should deploy cloud functions following the instructions in Readme file. (item 7)

WilVod commented 5 years ago

Hi @Batishev-Rozdoum @rozdoum ,

Already did. Maybe I messed up something?

Steps I followed:

  1. run: npm install -g firebase-tools
  2. run: firebase login
  3. run: firebase init functions
  4. Choose Javascript
  5. Overrode everything except index.js (maybe I should try not to override anything?)
  6. run: firebase deploy --only functions
Batishev-Rozdoum commented 5 years ago

Maybe something went wrong when you deploy the functions. Try to redeploy them. Cloud function status you can check in firebase console.

EmmanuelSantiago commented 3 years ago

image Hi iam triying to use your repository, have the same problem dont appear the followingPostIds; the problem is that error appears when doing the firebase deploy