googlearchive / friendlypix Goto Github PK
View Code? Open in Web Editor NEWFriendlyPix is a cross-platform Firebase example app
Home Page: https://firebase.google.com
FriendlyPix is a cross-platform Firebase example app
Home Page: https://firebase.google.com
Did Firebase/ Storage change the rules namespace/ am I missing something here?
I made some changes to the front-end and when deploying to firebase I received this error which hasn't come up before today:
I double checked my rules, and they remain the untouched besides the addition of my storage bucket and they look the same as the Master on the Web repo
Rules can be found at - ./friendlypix/web/storage.rules
Bug in current's user User Detail screen when taping follow/unfollow button. For some reason, if a user visits his own User Detail screen, whenever he toggles the follow/unfollow button the ImageViews containing his posts will duplicate.
After I deployed the app - mine doesnt show the button to Login w/ Google.
Did I miss a step?
Every time you change your phone orientation (portrait or landscape) the app will make a new firebase call to retrieve posts
Warning:Dependency org.apache.httpcomponents:httpclient:4.3.1 is ignored for prodDebug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
I observed that search and follow other users in Angular Application. I cannot find the same in Android code .
I've only found information documenting setting max height or width in the input=image/* categories but i assume 1280 = 1280x720 in this uploader.js static function referrs to?
Also, since the image is drawn to canvas, and uses polyfills for blobs, I was hitting some issues where an iPhone image capture would fail during upload once i raised the max dimensions and was wondering if you had suggested max's if I was looking to capture a full resolution image.
It shows nothing all other parts are working except Home fragment for android sample.
The home feed in android's version isn't implemented yet.
Every time I try and build on Windows I get the following error:
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "E:\\Program Files\\nodejs\\node.exe" "E:\\Users\\derek\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v6.2.1
npm ERR! npm v3.10.7
npm ERR! code ELIFECYCLE
npm ERR! @ build: `babel scripts -s --minified --compact true -d lib; bower install; echo 'Done. Ready to deploy.'`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ build script 'babel scripts -s --minified --compact true -d lib; bower install; echo 'Done. Ready to deploy.''.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel scripts -s --minified --compact true -d lib; bower install; echo 'Done. Ready to deploy.'
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\Windows\System32\dev\sharestruck\npm-debug.log
Also, I would include the npm-debug.log if it existed.
Topic to start a discussion about implementing the feature Direct Message to android's version. Anybody interested in help with this feature?
I'm especially looking for a sample of testing the website.
Found this comment within UserDetailActivity.java and noticed that the suggestion proceeds! I'm just bringing it out to help others to also contribute.
line 78: // TODO: Investigate why initial toolbar title is activity name instead of blank.
The following command doesn't work in windows CLI.
"serve": "bower install; firebase serve & babel -w scripts -s --retain-lines -d lib"
See here for some more info : http://stackoverflow.com/questions/30950032/how-can-i-run-multiple-npm-scripts-in-parallel
Hey guys, thanks for sharing this awesome sample. I would like to know If there is any AngularJs implementation of this? I already looked at the web script but I was not able to figure it out how to use it in AngularJs. Any help with this is highly appreciated.
Hello, I have tested Friendlypix on lollipop and marshmallow and works fine posting images but on my nexus 5x nougat 7.1.1 I get a , 'couldn't resize bitmap' error.
If you can add "how to deploy it to you own google project" to README would be great
In the readme, it says to start a local server to run in development by running "npm run serve" however it does not appear to run the "serve" script correctly from package.json
current script in package.json for npm run is:
"serve": "bower install; firebase serve & babel -w scripts -s --retain-lines -d lib"}
It seems to be missing bower arguments, skips creating the local firebase server and then compiles the scripts with babel and then stalls from there. Browsing to localhost:5000 shows that nothing is being served.
However, if you have all of the bower components installed/updated beforehand and run "firebase serve" in the directory it seems to work just fine:
If you select a transparent image, it shows it on a white background. After uploading, you get an opaque image with a black background. For GIFs it shows the preview like animation is allowed, but it's not. If an image is uploaded that lacks an extension, the preview doesn't show up, but it does work when uploading. Finally, the sizing of the image is completely different in the preview (full image shown with it's native ratio) from the resulting card when uploaded (fills available fixed area, usually cutting some off).
After I login in and press Show feed the app crash:
07-22 10:52:04.942 14211-14211/com.google.firebase.samples.apps.friendlypixx E/UncaughtException: com.google.firebase.database.DatabaseException: Can't convert object of type java.lang.String to type com.google.firebase.samples.apps.friendlypixx.Models.Author
at com.google.android.gms.internal.zzaix.zzd(Unknown Source)
at com.google.android.gms.internal.zzaix.zzb(Unknown Source)
at com.google.android.gms.internal.zzaix.zza(Unknown Source)
at com.google.android.gms.internal.zzaix.zzb(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zze(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaC(Unknown Source)
at com.google.android.gms.internal.zzaix.zzd(Unknown Source)
at com.google.android.gms.internal.zzaix.zzb(Unknown Source)
at com.google.android.gms.internal.zzaix.zza(Unknown Source)
at com.google.firebase.database.DataSnapshot.getValue(Unknown Source)
at com.firebase.ui.database.FirebaseRecyclerAdapter.parseSnapshot(FirebaseRecyclerAdapter.java:147)
at com.firebase.ui.database.FirebaseRecyclerAdapter.getItem(FirebaseRecyclerAdapter.java:136)
at com.firebase.ui.database.FirebaseRecyclerAdapter.onBindViewHolder(FirebaseRecyclerAdapter.java:176)
at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:5471)
at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:5504)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4741)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4617)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1994)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1390)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1353)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:574)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3028)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2906)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3283)
at android.view.View.layout(View.java:15682)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:580)
at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
at android.view.View.layout(View.java:15682)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1695)
at android.view.View.layout(View.java:15682)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.support.design.widget.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:122)
at android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42)
at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1192)
at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:814)
at android.view.View.layout(View.java:15682)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:580)
at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
at android.view.View.layout(View.java:15682)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1466)
at android.view.View.layout(View.java:15682)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:580)
at android.widget.FrameLayout.onLayout(FrameLayout.java:514)
at android.view.View.layout(View.java:15682)
at android.view.ViewGroup.layout(ViewGroup.java:5039)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1703)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1557)
at android.widget.LinearLayout.onLayout(LinearLa
I'm getting null pointer exception on loading image post. Uri returned from user.getPhotoUrl() is null
public static Author getAuthor() {
FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
if (user == null) return null;
return new Author(user.getDisplayName(), user.getPhotoUrl().toString(), user.getUid());
}
Logcat
05-29 13:05:51.309 15438-15955/com.google.firebase.samples.apps.friendlypix E/AndroidRuntime: FATAL EXCEPTION: FirebaseStorage-Callbacks-1
Process: com.google.firebase.samples.apps.friendlypix, PID: 15438
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.toString()' on a null object reference
at com.google.firebase.samples.apps.friendlypix.FirebaseUtil.getAuthor(FirebaseUtil.java:45)
at com.google.firebase.samples.apps.friendlypix.NewPostUploadTaskFragment$UploadPostTask$2$2.onSuccess(NewPostUploadTaskFragment.java:182)
at com.google.firebase.samples.apps.friendlypix.NewPostUploadTaskFragment$UploadPostTask$2$2.onSuccess(NewPostUploadTaskFragment.java:174)
at com.google.firebase.storage.StorageTask$1.zza(Unknown Source)
at com.google.firebase.storage.StorageTask$1.zzl(Unknown Source)
at com.google.firebase.storage.zze$2.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
After I config and downloaded the google-services.json from https://developers.google.com/mobile/add and followed this post http://stackoverflow.com/questions/30772201/google-services-json-for-different-productflavors/34364376#34364376
I still got the following error.
Error:Execution failed for task ':app:processDev2DebugGoogleServices'.
No matching client found for package name 'com.google.firebase.samples.apps.friendlypixtest'
I'm proposing to implement an user's search feature to help finding profiles to follow/unfollow. Let's discuss this feature here?
I was looking for an example of a rule where only authors could write on a path, and I found this:
"posts": {
".read": true,
"$postId": {
".write": "(auth.uid === newData.child('author').child('uid').val()) || (!newData.exists() && auth.uid === data.child('author').child('uid').val())" // Allow Writes and deletes
}
},
As the comment says, it actually allows writes and deletes.
However, the way the rule checks if the author/uid
is the same as the current auth.id
allows any author to override other author's posts.
In fact, the rule only validates that the newData
contains the authenticated user id but it ignores the current value (data
).
As a result, I can assign other people's posts to myself using the console:
firebase.database().ref('/posts/POST_ID').update({ author: { uid: 'MY_AUTH_UID' } })
A stronger rule would be:
".write": "(newData.exists() && auth.uid === newData.child('author').child('uid').val() || !newData.exists()) && (data.exists() && auth.uid === data.child('author').child('uid').val() || !data.exists())",
It checks newData
(create, update) and data
as well (update, delete).
Hello,
I've setup my project, included the .plist
and added the URL scheme however I cannot sign in.
Are there any other changes to be made?
Web app is up here
2016-12-26 17:58:39.434099 FriendlyPix[16642:4004325] KZPropertyMapper: Ignoring value at index notificationTokens in type FPUser as it's not mapped
2016-12-26 17:58:39.434271 FriendlyPix[16642:4004325] KZPropertyMapper: Ignoring value at index _search_index in type FPUser as it's not mapped
2016-12-26 17:58:39.434344 FriendlyPix[16642:4004325] KZPropertyMapper: Ignoring value at index posts in type FPUser as it's not mapped
2016-12-26 17:58:39.850221 FriendlyPix[16642:4004325] Warning: Attempt to present <FPTabBarController: 0x101691050> on <UINavigationController: 0x10206a200> whose view is not in the window hierarchy!
When you are logged in, and press back button multiple times, you can go back to login screen without logging out.
I was going to make a fork of the iOS app and rewrite it in Swift. I just figured I'd post here before doing so incase there was any input or urge to recode it within this repo.
Hi,
For my local repo can I delete all the files from "Initial WIP commit to get code into VCS."? will it be ok? I just want to remove files that are not being used at all.
thanks.
Comparing the web version with the android version, it's pretty clear that this feature besides not being properly finished, it's not neat enough. Maybe using a 3 columns grid or even a linear vertical recycler view should be much more good looking than the way it is now. Should we improve it?
If you've uploaded an image, errant posts will show that image until you refresh the page, at which point it won't show any image. Clicking to view the full image works.
e.g.
Looking at the code it seems all the feed are fetched in one go. This will be problematic when there is lot of data to be fetched. The https://friendly-pix.com/ site is providing feed pagination. Should the Query class be used for pagination ?
I don't really want to include Google or Facebook sign in. I just wanted to test it with "skip sign in", but it didn't show. Since I don't want to set up Google and Facebook sign in I am not updating the stuff that I have to do with those two. Is there anything I have to do to make "skip sign in" appear? I deployed it locally and tried to access http://localhost:5000/feed but didn't work.
The android app is crashing after every post submit. However if you get back to the app the post was successfully done.
Android 6.x
page.js:1 Uncaught SyntaxError: Unexpected token <
jquery.min.js:1 Uncaught SyntaxError: Unexpected token <
latinize.js:1 Uncaught SyntaxError: Unexpected token <
sweetalert.min.js:1 Uncaught SyntaxError: Unexpected token <
auth.js:42Uncaught ReferenceError: $ is not defined_class @ auth.js:42(anonymous function) @ auth.js:96
search.js:48Uncaught ReferenceError: $ is not defined_class @ search.js:48(anonymous function) @ search.js:104
uploader.js:57Uncaught ReferenceError: $ is not defined_class @ uploader.js:57(anonymous function) @ uploader.js:263
userpage.js:34Uncaught ReferenceError: $ is not defined_class @ userpage.js:34(anonymous function) @ userpage.js:284
post.js:37Uncaught ReferenceError: $ is not defined_class @ post.js:37(anonymous function) @ post.js:365
feed.js:38Uncaught ReferenceError: $ is not defined_class @ feed.js:38(anonymous function) @ feed.js:238
routing.js:30Uncaught ReferenceError: $ is not defined_class @ routing.js:30(anonymous function) @ routing.js:142
material.min.js:1 Uncaught SyntaxError: Unexpected token <
Images are changing orientation after upload. It's image resizing error
UserDetail not displaying displayName. Instead, it is displaying a generic label "Unknown User".
The app is throwing the following error when I try and build either in the simulator or on the actual device. Can someone please point me in the right direction. Thanks.
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target 7.0 --output-format human-readable-text --compile /Users/gregkockott/Library/Developer/Xcode/DerivedData/FriendlyPix-cokdbrzofvrkvcepjjnzxixrkvpj/Build/Products/Debug-iphonesimulator/FriendlyPix.app/STXUserActionCell.nib /Users/gregkockott/www/friendlypix/ios/Pods/STXDynamicTableView/STXDynamicTableView/Cells/STXUserActionCell.xib --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platf/Users/gregkockott/www/friendlypix/ios/Pods/Target Support Files/Pods-FriendlyPix/Pods-FriendlyPix-resources.sh: line 51: echo: write error: Resource temporarily unavailable Command /bin/sh failed with exit code 1
Some user's names are null: https://friendly-pix.com/user/c4VYwfYQaISSgZ5Czy7lX4n7DrQ2
Need to investigate that.
I have substituted my firebase storage bucket in "google_storage_bucket" variable in strings.xml
but the app crashes after google login.
Called from function
showSignedInUI
crashes on this lin
FirebaseUtil.getPeopleRef().child(firebaseUser.getUid()).updateChildren(
updateValues,
new DatabaseReference.CompletionListener() {
@Override
public void onComplete(DatabaseError firebaseError, DatabaseReference databaseReference) {
if (firebaseError != null) {
Toast.makeText(ProfileActivity.this,
"Couldn't save user data: " + firebaseError.getMessage(),
Toast.LENGTH_LONG).show();
}
}
});
05-21 08:09:05.094 14758-18018/com.google.firebase.samples.apps.friendlypix I/FA: Tag Manager is not found and thus will not be used
05-21 08:09:05.290 14758-14758/com.google.firebase.samples.apps.friendlypix D/FirebaseCrashApiImpl: throwable com.google.firebase.database.DatabaseException: Failed to get FirebaseDatabase instance: FirebaseApp object has no DatabaseURL in its FirebaseOptions object.
05-21 08:09:05.336 14758-14758/com.google.firebase.samples.apps.friendlypix E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.google.firebase.samples.apps.friendlypix, PID: 14758
com.google.firebase.database.DatabaseException: Failed to get FirebaseDatabase instance: FirebaseApp object has no DatabaseURL in its FirebaseOptions object.
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.google.firebase.samples.apps.friendlypix.FirebaseUtil.getBaseRef(FirebaseUtil.java:27)
at com.google.firebase.samples.apps.friendlypix.FirebaseUtil.getPeopleRef(FirebaseUtil.java:69)
at com.google.firebase.samples.apps.friendlypix.ProfileActivity.showSignedInUI(ProfileActivity.java:199)
at com.google.firebase.samples.apps.friendlypix.ProfileActivity.handleFirebaseAuthResult(ProfileActivity.java:176)
at com.google.firebase.samples.apps.friendlypix.ProfileActivity.access$000(ProfileActivity.java:61)
at com.google.firebase.samples.apps.friendlypix.ProfileActivity$2.onSuccess(ProfileActivity.java:159)
at com.google.firebase.samples.apps.friendlypix.ProfileActivity$2.onSuccess(ProfileActivity.java:156)
at com.google.android.gms.tasks.zze$1.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
How to fix this ?
i keep having could not create upload task when try to upload for both home and feed tab.
in Firebase.js line 430
var picUploadTask = picRef.put(pic, metadata).then(snapshot => {
console.log('New pic uploaded. Size:', snapshot.totalBytes, 'bytes.');
var url = snapshot.metadata.downloadURLs[0];
console.log('File available at', url);
return url;
}).catch(error => {
console.error('Error while uploading new pic', error);
});
Besides the idea of following himself being useless, this behavior is causing some sort of cloning everytime the auth user clicks follow/unfollow button inside his own UserDetail screen.
I keep getting this error?
error: unable to read module map contents from 'Target Support Files/UALogger/UALogger.modulemap': Error Domain=NSCocoaErrorDomain Code=260 "The file “UALogger.modulemap” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/jdambrosio/Downloads/friendlypix-master/ios/Pods/Target Support Files/UALogger/UALogger.modulemap, NSUnderlyingError=0x7fadd2d66f50 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
@iulukaya got 11 warnings in my Xcode 7.3.
I am doing something wrong?
Thanks
I guess it was expected that this menu item should also display the user's profile. I think that menu items doesn't allow to customize the icon format, so that probably it won't be possible to repeat the circle format for profile pictures that are being used throughout the app. The options I see are:
User Detail view not displaying profile picture. Instead it is displaying a blank avatar icon.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.