Production Build find query returns 'Table with the name o does not exist'


I have a find query that works correctly when I am using a local environment:

Backendless.Persistence.of( BackendlessAppventure ).find( dataQuery, callback);

However, after using webpack to build the React JS app, and pushing to Github pages for hosting, the query no longer works.

Other backendless features, such a login still work correctly.

Can you help me understand how I can fix this?



Hi James,

Is there an error you’re getting when it does not work?


GET 404 (Not Found)
Backendless.js:272 error message - Table with the name o does not exist. Make sure the client class referenced in the API call has the same literal name as the table in Backendless console
Backendless.js:273 error code - 404

Does the table “o” exist? The code you posted should be fetching data from the “BackendlessAppventure” table. Is it possible that the code got obfuscated and the BackendlessAppventure class is renamed to “o” ?

Yes, that is exactly what happens.
When the code is compiled and minified, all classes, and functions are renamed to letters.

I try and rename them manually in the compiled code, but there must be a better way, although I expect that falls outside of your customer support.

Many thanks.

I would recommend finding a way to exclude the classes which are used in the data transfer - that would be the classes which are used in the of() method as well as any related entities.

Alternatively, you could use the “untyped object” approach - of( “tableName” ), which is better documented in version 4 (but also supported in 3.x):

Using “untyped object” approach - of( “tableName” ) was the simplest approach, and now works well so far in production.