Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Authmethods {
- final FirebaseAuth _auth = FirebaseAuth.instance;
- final FirebaseFirestore _firestore = FirebaseFirestore.instance;
- Future<String> signUpUser({
- required String email,
- required String password,
- required String username,
- required String bio,
- required Uint8List file,
- }) async {
- String res = "Some error occured";
- try {
- if (email.isNotEmpty ||
- password.isNotEmpty ||
- username.isNotEmpty ||
- bio.isNotEmpty ||
- file.isNotEmpty) {
- String photoUrl = await StorageMethods()
- .uploadImageStorage('profilepics', file, false);
- UserCredential cred = await _auth.createUserWithEmailAndPassword(
- email: email, password: password);
- print(cred.user!.uid);
- await _firestore.collection('users').doc(cred.user!.uid).set({
- 'username': username,
- 'uid': cred.user!.uid,
- 'email': email,
- 'bio': bio,
- 'followers': [],
- 'following': [],
- 'photoUrl': photoUrl
- });
- res = "Succes";
- }
- } catch (err) {
- res = err.toString() + "iiiiiiiiiiiiiiiiiiii";
- }
- return res;
- }
- }
- class StorageMethods {
- final FirebaseStorage _storage = FirebaseStorage.instance;
- final FirebaseAuth _auth = FirebaseAuth.instance;
- Future<String> uploadImageStorage(
- String childname, Uint8List file, bool ispost) async {
- Reference ref =
- _storage.ref().child(childname).child(_auth.currentUser!.uid);
- UploadTask uploadTask = ref.putData(file);
- TaskSnapshot snap = await uploadTask;
- String downloadUrl = await snap.ref.getDownloadURL();
- return downloadUrl;
- }
- }
- ERROR =
- Launching lib\main.dart on MT2111 in debug mode...
- √ Built build\app\outputs\flutter-apk\app-debug.apk.
- Connecting to VM Service at ws://127.0.0.1:51203/Bg_aLR-chF4=/ws
- E/Parcel (25495): Reading a NULL string not supported here.
- I/ample.instagra(25495): ProcessProfilingInfo new_methods=2296 is saved saved_to_disk=1 resolve_classes_delay=5000
- E/Parcel (25495): Reading a NULL string not supported here.
- D/OplusBaseActivityThread(25495): post a callback for sC:android.view.Choreographer@16dd700 by pid:25495 tid:25495
- D/OplusBaseActivityThread(25495): pid:25495 tid:25495 doframe Callback
- I/AssistStructure(25495): Flattened final assist data: 476 bytes, containing 1 windows, 3 views
- ════════ Exception caught by rendering library ═════════════════════════════════
- The following assertion was thrown during layout:
- A RenderFlex overflowed by 9.0 pixels on the bottom.
- The relevant error-causing widget was
- Column
- You can inspect this widget using the 'Inspect Widget' button in the VS Code notification.
- The overflowing RenderFlex has an orientation of Axis.vertical.
- The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
- Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the RenderFlex to fit within the available space instead of being sized to their natural size.
- This is considered an error condition because it indicates that there is content that cannot be seen. If the content is legitimately bigger than the available space, consider clipping it with a ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex, like a ListView.
- The specific RenderFlex in question is: RenderFlex#39e47 relayoutBoundary=up4 OVERFLOWING
- ════════════════════════════════════════════════════════════════════════════════
- W/IInputConnectionWrapper(25495): getTextBeforeCursor on inactive InputConnection
- I/AssistStructure(25495): Flattened final assist data: 472 bytes, containing 1 windows, 3 views
- W/IInputConnectionWrapper(25495): getTextAfterCursor on inactive InputConnection
- W/IInputConnectionWrapper(25495): getSelectedText on inactive InputConnection
- I/AssistStructure(25495): Flattened final assist data: 476 bytes, containing 1 windows, 3 views
- I/AssistStructure(25495): Flattened final assist data: 468 bytes, containing 1 windows, 3 views
- I/DpmTcmClient(25495): RegisterTcmMonitor from: $Proxy1
- W/System (25495): Ignoring header X-Firebase-Locale because its value was null.
- D/FirebaseAuth(25495): Notifying id token listeners about a sign-out event.
- D/FirebaseAuth(25495): Notifying auth state listeners about a sign-out event.
- E/StorageUtil(25495): error getting token java.util.concurrent.ExecutionException: com.google.firebase.auth.FirebaseAuthInvalidUserException: There is no user record corresponding to this identifier. The user may have been deleted.
- I/TetheringManager(25495): registerTetheringEventCallback:com.example.instagram
- W/NetworkRequest(25495): no auth token for request
- E/StorageException(25495): StorageException has occurred.
- E/StorageException(25495): An unknown error occurred, please check the HTTP result code and inner exception for server response.
- E/StorageException(25495): Code: -13000 HttpResult: 400
- E/StorageException(25495): The server has terminated the upload session
- E/StorageException(25495): java.io.IOException: The server has terminated the upload session
- E/StorageException(25495): at com.google.firebase.storage.UploadTask.serverStateValid(UploadTask.java:339)
- E/StorageException(25495): at com.google.firebase.storage.UploadTask.shouldContinue(UploadTask.java:308)
- E/StorageException(25495): at com.google.firebase.storage.UploadTask.run(UploadTask.java:229)
- E/StorageException(25495): at com.google.firebase.storage.StorageTask.lambda$getRunnable$7$com-google-firebase-storage-StorageTask(StorageTask.java:1072)
- E/StorageException(25495): at com.google.firebase.storage.StorageTask$$ExternalSyntheticLambda3.run(Unknown Source:2)
- E/StorageException(25495): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
- E/StorageException(25495): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
- E/StorageException(25495): at java.lang.Thread.run(Thread.java:923)
- E/StorageException(25495): Caused by: java.io.IOException: { "error": { "code": 400, "message": "Your bucket has not been set up properly for Firebase Storage. Please visit 'https://console.firebase.google.com/project/instagram-clone-73843/storage/files' to automatically repair this issue and then retry. If the issue lasts longer than five minutes, you may have insufficient permissions to repair the project. You can check your permissions by visiting 'https://console.firebase.google.com/iam-admin/iam/project?project=instagram-clone-73843'." }}
- E/StorageException(25495): at com.google.firebase.storage.network.NetworkRequest.parseResponse(NetworkRequest.java:445)
- E/StorageException(25495): at com.google.firebase.storage.network.NetworkRequest.parseErrorResponse(NetworkRequest.java:462)
- E/StorageException(25495): at com.google.firebase.storage.network.NetworkRequest.processResponseStream(NetworkRequest.java:453)
- E/StorageException(25495): at com.google.firebase.storage.network.NetworkRequest.performRequest(NetworkRequest.java:272)
- E/StorageException(25495): at com.google.firebase.storage.network.NetworkRequest.performRequest(NetworkRequest.java:289)
- E/StorageException(25495): at com.google.firebase.storage.internal.ExponentialBackoffSender.sendWithExponentialBackoff(ExponentialBackoffSender.java:76)
- E/StorageException(25495): at com.google.firebase.storage.internal.ExponentialBackoffSender.sendWithExponentialBackoff(ExponentialBackoffSender.java:68)
- E/StorageException(25495): at com.google.firebase.storage.UploadTask.sendWithRetry(UploadTask.java:477)
- E/StorageException(25495): at com.google.firebase.storage.UploadTask.beginResumableUpload(UploadTask.java:276)
- E/StorageException(25495): at com.google.firebase.storage.UploadTask.run(UploadTask.java:224)
- E/StorageException(25495): ... 5 more
- E/StorageException(25495): StorageException has occurred.
- E/StorageException(25495): An unknown error occurred, please check the HTTP result code and inner exception for server response.
- E/StorageException(25495): Code: -13000 HttpResult: 400
- E/StorageException(25495): The server has terminated the upload session
- E/StorageException(25495): java.io.IOException: The server has terminated the upload session
- E/StorageException(25495): at com.google.firebase.storage.UploadTask.serverStateValid(UploadTask.java:339)
- E/StorageException(25495): at com.google.firebase.storage.UploadTask.shouldContinue(UploadTask.java:308)
- E/StorageException(25495): at com.google.firebase.storage.UploadTask.run(UploadTask.java:229)
- E/StorageException(25495): at com.google.firebase.storage.StorageTask.lambda$getRunnable$7$com-google-firebase-storage-StorageTask(StorageTask.java:1072)
- E/StorageException(25495): at com.google.firebase.storage.StorageTask$$ExternalSyntheticLambda3.run(Unknown Source:2)
- E/StorageException(25495): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
- E/StorageException(25495): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
- E/StorageException(25495): at java.lang.Thread.run(Thread.java:923)
- E/StorageException(25495): Caused by: java.io.IOException: { "error": { "code": 400, "message": "Your bucket has not been set up properly for Firebase Storage. Please visit 'https://console.firebase.google.com/project/instagram-clone-73843/storage/files' to automatically repair this issue and then retry. If the issue lasts longer than five minutes, you may have insufficient permissions to repair the project. You can check your permissions by visiting 'https://console.firebase.google.com/iam-admin/iam/project?project=instagram-clone-73843'." }}
- E/StorageException(25495): at com.google.firebase.storage.network.NetworkRequest.parseResponse(NetworkRequest.java:445)
- E/StorageException(25495): at com.google.firebase.storage.network.NetworkRequest.parseErrorResponse(NetworkRequest.java:462)
- E/StorageException(25495): at com.google.firebase.storage.network.NetworkRequest.processResponseStream(NetworkRequest.java:453)
- E/StorageException(25495): at com.google.firebase.storage.network.NetworkRequest.performRequest(NetworkRequest.java:272)
- E/StorageException(25495): at com.google.firebase.storage.network.NetworkRequest.performRequest(NetworkRequest.java:289)
- E/StorageException(25495): at com.google.firebase.storage.internal.ExponentialBackoffSender.sendWithExponentialBackoff(ExponentialBackoffSender.java:76)
- E/StorageException(25495): at com.google.firebase.storage.internal.ExponentialBackoffSender.sendWithExponentialBackoff(ExponentialBackoffSender.java:68)
- E/StorageException(25495): at com.google.firebase.storage.UploadTask.sendWithRetry(UploadTask.java:477)
- E/StorageException(25495): at com.google.firebase.storage.UploadTask.beginResumableUpload(UploadTask.java:276)
- E/StorageException(25495): at com.google.firebase.storage.UploadTask.run(UploadTask.java:224)
- E/StorageException(25495): ... 5 more
- I/flutter (25495): [firebase_storage/unknown] An unknown error occurrediiiiiiiiiiiiiiiiiiii
- I/flutter (25495): Null check operator used on a null valueiiiiiiiiiiiiiiiiiiii
- E/Parcel (25495): Reading a NULL string not supported here.
- E/AndroidRuntime(29424): FATAL EXCEPTION: main
- E/AndroidRuntime(29424): Process: com.xiaomi.calendar, PID: 29424
- E/AndroidRuntime(29424): java.lang.NoClassDefFoundError: Failed resolution of: Lmiui/os/Build;
- E/AndroidRuntime(29424): at com.miui.calendar.util.LocalizationUtils.<clinit>(LocalizationUtils.java:20)
- E/AndroidRuntime(29424): at com.miui.calendar.util.LocalizationUtils.isLocalFeatureEnabled(LocalizationUtils.java:32)
- E/AndroidRuntime(29424): at com.miui.calendar.job.RemoteJobService.startJob(RemoteJobService.java:84)
- E/AndroidRuntime(29424): at com.miui.calendar.job.BaseJobService.onStartJob(BaseJobService.java:26)
- E/AndroidRuntime(29424): at android.app.job.JobService$1.onStartJob(JobService.java:64)
- E/AndroidRuntime(29424): at android.app.job.JobServiceEngine$JobHandler.handleMessage(JobServiceEngine.java:131)
- E/AndroidRuntime(29424): at android.os.Handler.dispatchMessage(Handler.java:106)
- E/AndroidRuntime(29424): at android.os.Looper.loop(Looper.java:262)
- E/AndroidRuntime(29424): at android.app.ActivityThread.main(ActivityThread.java:8248)
- E/AndroidRuntime(29424): at java.lang.reflect.Method.invoke(Native Method)
- E/AndroidRuntime(29424): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
- E/AndroidRuntime(29424): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:992)
- E/AndroidRuntime(29424): Caused by: java.lang.ClassNotFoundException: miui.os.Build
- E/AndroidRuntime(29424): ... 12 more
Add Comment
Please, Sign In to add comment