Bird
Raised Fist0
Firebasecloud~20 mins

Crash reporting in Firebase - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Crash Reporting Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate
2:00remaining
Understanding Crash Report Upload Timing

When using Firebase Crashlytics in a mobile app, when are crash reports typically uploaded to the Firebase console?

AOn the next app launch after a crash has occurred.
BCrash reports are sent continuously in real-time during app usage.
COnly when the user manually triggers a report upload in the app settings.
DImmediately when the app crashes, before the app closes.
Attempts:
2 left
💡 Hint

Think about when the app can safely send data after a crash.

❓ Architecture
intermediate
2:00remaining
Crashlytics Integration Architecture

Which Firebase Crashlytics integration method ensures crash reports are collected with minimal impact on app startup time?

AInitializing Crashlytics synchronously in the main thread during app launch.
BInitializing Crashlytics asynchronously in a background thread after app launch.
CManually triggering Crashlytics initialization only when a crash is detected.
DDisabling Crashlytics initialization to improve startup time.
Attempts:
2 left
💡 Hint

Consider how to balance crash data collection and app responsiveness.

❓ security
advanced
2:00remaining
Protecting Crash Data Privacy

Which practice best protects user privacy when using Firebase Crashlytics crash reports?

AAnonymizing or avoiding sensitive user data in custom crash logs and keys.
BIncluding full user personal data in crash logs for easier debugging.
CSharing crash reports publicly without restrictions for transparency.
DDisabling crash reporting to avoid any data collection.
Attempts:
2 left
💡 Hint

Think about privacy laws and user trust.

❓ Configuration
advanced
2:00remaining
Configuring Crashlytics for Non-Fatal Errors

How can you report a caught exception as a non-fatal error to Firebase Crashlytics in your app?

Choose the correct code snippet for reporting a non-fatal exception in Firebase Crashlytics (JavaScript for React Native):

Firebase
try {
  // some code that may throw
} catch (error) {
  // report error here
}
Afirebase.crashlytics().sendNonFatal(error);
Bfirebase.crashlytics().log(error.message);
Cfirebase.crashlytics().reportException(error);
Dfirebase.crashlytics().recordError(error);
Attempts:
2 left
💡 Hint

Look for the official method to record caught errors.

✅ Best Practice
expert
2:00remaining
Optimizing Crashlytics Data Usage in Production

To reduce network usage and respect user data limits, which is the best practice for controlling Firebase Crashlytics crash report uploads in a production app?

AAlways upload crash reports immediately regardless of network type or user settings.
BDisable crash reporting entirely in production to save data.
CUpload crash reports only when the device is connected to Wi-Fi and the user consents.
DUpload crash reports only when the app is in debug mode.
Attempts:
2 left
💡 Hint

Consider user experience and data costs.

Practice

(1/5)
1. What is the main purpose of Firebase Crashlytics in an app?
easy
A. To store user data securely
B. To manage user authentication
C. To improve app loading speed
D. To automatically collect and report app crashes

Solution

  1. Step 1: Understand Crashlytics role

    Firebase Crashlytics is designed to track and report app crashes automatically.
  2. Step 2: Compare with other options

    Storing user data, improving speed, and managing authentication are not Crashlytics functions.
  3. Final Answer:

    To automatically collect and report app crashes -> Option D
  4. Quick Check:

    Crashlytics = crash reporting [OK]
Hint: Crashlytics = crash reports, not data or speed [OK]
Common Mistakes:
  • Confusing Crashlytics with user data storage
  • Thinking it speeds up the app
  • Mixing it with authentication services
2. Which Firebase Crashlytics method is used to log custom messages before a crash?
easy
A. crashlytics.sendReport()
B. crashlytics.recordError()
C. crashlytics.log()
D. crashlytics.startSession()

Solution

  1. Step 1: Identify logging method

    The method to add custom logs before a crash is crashlytics.log().
  2. Step 2: Understand other methods

    recordError() reports errors, sendReport() and startSession() are not valid Crashlytics methods.
  3. Final Answer:

    crashlytics.log() -> Option C
  4. Quick Check:

    Logging = crashlytics.log() [OK]
Hint: Use .log() to add messages before crash [OK]
Common Mistakes:
  • Using recordError() to log messages
  • Assuming sendReport() exists
  • Confusing startSession() with logging
3. Given this code snippet, what will Crashlytics report?
try {
  throw new Error('Test crash');
} catch (e) {
  firebase.crashlytics().recordError(e);
}
medium
A. Crashlytics reports a non-fatal error with message 'Test crash'
B. Crashlytics logs a warning but no error
C. App crashes immediately without reporting
D. No crash reported because error is caught

Solution

  1. Step 1: Analyze try-catch behavior

    The error is thrown but caught, so the app does not crash.
  2. Step 2: Understand recordError effect

    recordError() sends a non-fatal error report to Crashlytics with the error message.
  3. Final Answer:

    Crashlytics reports a non-fatal error with message 'Test crash' -> Option A
  4. Quick Check:

    recordError() = non-fatal error report [OK]
Hint: recordError() reports caught errors as non-fatal [OK]
Common Mistakes:
  • Thinking caught errors cause app crash
  • Assuming no report if error is caught
  • Confusing recordError() with crash trigger
4. You added firebase.crashlytics().log('User clicked button'); but no logs appear in Crashlytics dashboard. What is the likely issue?
medium
A. Logs only appear after a crash occurs
B. log() method does not exist in Crashlytics
C. Crashlytics SDK is not initialized properly
D. You must call sendReport() to send logs

Solution

  1. Step 1: Check Crashlytics log behavior

    Logs sent by log() appear only when a crash happens afterward.
  2. Step 2: Verify other options

    SDK initialization is required but if logs never appear, it's likely due to no crash. log() exists and sendReport() is not a Crashlytics method.
  3. Final Answer:

    Logs only appear after a crash occurs -> Option A
  4. Quick Check:

    Logs show after crash [OK]
Hint: Logs appear only after crash triggers [OK]
Common Mistakes:
  • Assuming logs show immediately
  • Thinking log() method is missing
  • Trying to send logs manually
5. How can you ensure that a caught error with extra context is reported to Firebase Crashlytics as a non-fatal issue with custom keys?
hard
A. Only use crashlytics().log() with error message
B. Use crashlytics().setCustomKey() before recordError()
C. Throw the error again to trigger a crash
D. Call crashlytics().sendReport() after catching error

Solution

  1. Step 1: Add context with custom keys

    Use setCustomKey() to add extra info about the error context.
  2. Step 2: Report error as non-fatal

    Call recordError() to send the caught error along with custom keys to Crashlytics.
  3. Final Answer:

    Use crashlytics().setCustomKey() before recordError() -> Option B
  4. Quick Check:

    Custom keys + recordError() = detailed non-fatal report [OK]
Hint: Set keys before recordError() for context [OK]
Common Mistakes:
  • Only logging message without keys
  • Throwing error again causes crash
  • Using non-existent sendReport() method
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard