Common issues - FAQ
  • 20 Jun 2022
  • 3 Minutes to read
  • Dark
    Light
  • PDF

Common issues - FAQ

  • Dark
    Light
  • PDF

> CORS error with a data resource

  • Example error message:

    Error: TypeError: Failed to fetch. Does the server allow CORS?status: undefined
    
  • CORS issues affect Web builds/preview

  • the issue is caused by the configuration of the backend / API system and cannot be resolved from within AppGyver

  • You can find more information here https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors

  • this error can also be caused by other types of errors in connecting to the backend or API, try to make sure the URL is connectable, for example in your browser

  • Verify that the API destination has CORS Headers in place via an online Cors-Checker.

> Nothing happens when trying to navigate from login page to another page

User is likely trying to open a page which requires authentication. The following change is needed in Composer:

· Open the page that you want to open from the initial page

· Open the page’s Advanced properties from the right-side menu

· Toggle Allow page to be opened without authentication
image.png

Other things to try:

· Set the initial page to be Log in from the Global toolbar Auth tab in composer

· Use Dismiss initial view flow function once the user is authenticated to allow navigation to all pages

> Application opens to endless spinner state

Likely caused by:

  • Initial page does not have hide spinner node in the logic canvas

    • You can change this by adding "Hide spinner" node connected to "Page mounted” event.
    • The initial page definition can be found from global toolbar navigation setting.!
      image.png
  • Initial page not likely defined in Global toolbar navigation setting

    • Go to Global toolbar navigations setting and define the initial page which is opened when the application opens
  • Originally defined initial page has been deleted (this is visible as endless spinner in mobile app and failure to open a page in web preview)

    • Go to Global toolbar navigation setting and check if the defined initial page exists. If not, define a new initial page.

image.png

> Data changes back after being edited

Likely caused by:

  • Data variable's logic canvas has a refresh loop that overrides the data variable's values every 5 seconds
    • You can change this by going to Variables > Data variables > yourDataVariable and opening the logic canvas on the bottom
    • This is what a refresh loop looks like:

image.png

  • Remove either the whole Delay node, or the connection between the success output of the "Get record" and the delay node, if you want the data to refresh until it succeeds to load.

> Issues in using Firebase data resources

  • Missing id from get, update, delete resource
    • Add a document id to the request.
    • Example error: string”INVALID_ARGUMENT: Document name “projects/PROJECT_NAME/databases/(default)/documents/COLLECTION” lacks “/” at index 58.
  • 404 not found response from get, update, delete resource
    • Make sure a document with the given document id exists.
    • Example error: NOT_FOUND: Document "projects/PROJECT_NAME/databases/(default)/documents/collection/nonexistentid” not found."
  • Firestore query condition limitations
  • Firestore sorting limitations
  • Missing index
    • Firestore requires indices on document fields that are used in query conditions and sorting. The error message should provide you a link to create the required index. Either create the indices on the fields you’re using in your queries beforehand or created them using the links from the error messages. · More information: https://firebase.google.com/docs/firestore/query-data/indexing
    • Example error: FAILED_PRECONDITION: The query requires an index. You can create it here: https://console.firebase.google.com/v1/r/project/project-id/firestore/indexes?create_composite=JKl8jdnqZ0cYzdy

> Flow function is not working either in preview app or standalone app

  • Make sure all the flow functions are updated from Flow function marker place in Composer Pro logic editor.
  • If this is not helping, please create an issue report.

> Build error: 403 ERR_BAD_REQUEST

  • Make sure that every configured data resource has successful requests via the 'Test' function. The build will fail even if an unused data resource is faulty.
  • Verify that fonts uploaded via custom URLs are still available.

> How to report an issue to AppGyver?

If you think there is a bug in AppGyver product, please report the issue in issue tracker.

You can find detailed issue submission guidelines here.


Was this article helpful?