Movies app movie database not working?

Movies app movie database not working?

  

I am quite new with Outsystems and I am going through mobile Movies assignment here: https://www.outsystems.com/learn/lesson/795/movies-assignment/ 

Cinema list works fine, but very similar movies list is empty. Also GetMovies aggregate editor says: "no records to show". 

I also downloaded movies app from forge:

https://www.outsystems.com/forge/component-discussions/2116/MoviesApp

and removed and reinstalled movies data module several times. (uplading takes some time, but completes succesfully ) Also I tried to add references several times, but that doesn't help.

Since Cinemas screen is working fine and I don't see any conceptual differences in movies/cinemas aggregate and I doesn't work with forge app neither,  I started to wonder if there is some change for all (e.g. in movies database API) breaking this?

Any hints?

If you have completed this assignment, it would be nice to hear, if that still works for you?

Hi Esa,

I've downloaded the Movies Data module and check that an aggregate to fetch the Movies entity is returning records. Then I've created a new module and referenced the Movies entity and it is also returning records:

Check this app (attached) to see if you are still having the same problems. If you want, share your app so I can see if there is any applicational issue.

Regards,

António Pereira

Thank you for prompt response.

 Movie data takes quite long to upload (8/1Mb connection) and first time caused communication error (same happened earlier, maybe always in first upload?) 

End result is still the same, cinemas working, but movies not.

Could too slow upload connection cause this problem since code you proved to working is not working for me? 

In the Movies Data, increase the "Server Request Timeout". It's the timeout that raises communication exceptions in the client when the server takes too much time to return an answer.

Does it solve your problem?

Regards,

António Pereira

This helped for communication error, but actual problem is still present. 

Attached my my app, but still think problem is somewhere in my env, since your version was not working for me neither.

Try to debug the Movies Data module and check the monitoring area in Service Center. Maybe you can understand better the problem.

As a workaround, add movie records manually to the entity. You can use the data present in the MoviesData.json (MovieData module).

Regards,

António Pereira

Service center has this kind of log:

11-05-2017 06:35:40LifeTimeEngine
(LifeTime)
[V56T1F062].DBO.[OSLTM_ENVIRONMENTAPPCACHE] with key 55 was not updatedBPMS28VJ-LT3252Detail
11-05-2017 06:32:03Movies_Esa
(Movies_Esa)
Invalid call of the 'TriggerOnUpgradeProgress' client action of the 'Common.Splash' since the latter is not currently active. This is likely due to a platform's client action being used as an event handler or in a setTimeout function. Consider removing this call by using the 'On Destroy' event of the screen/block or moving your logic to a global client action.ControllerS28VJ-LT3252Detail
11-05-2017 06:32:03Movies_Esa
(Movies_Esa)
Invalid call of the 'TriggerOnUpgradeProgress' client action of the 'Common.Splash' since the latter is not currently active. This is likely due to a platform's client action being used as an event handler or in a setTimeout function. Consider removing this call by using the 'On Destroy' event of the screen/block or moving your logic to a global client action.ControllerS28VJ-LT3252Detai

Is this related? 

I tried to debug, movies data and in bootstrapThemovieDb Get MovieGenres returns 19 genres but all other rest calls total result lenght is 0.

I tried to test DiscoverMovie manually, first there was incorrect api key response, but after adding that in url, I got good response. I left api _key to url, but still it doesn't work, so is it somehow overwriting wrong api_key there or what could cause this?


Actually api_key seems to correct in onBeforRequest.


Solution

I finally got it working! Somehow currDate() function doesn't work for me in this case. I replaced that function with current date hardcoded for each rest call in BootstrapTheMovieDb server action. I have correct date in my PC and service center, so what could possibly cause wrong behavior?

(Maybe different date format used in my PC? "11-May-17")

Anyway I can continue with course, thank you Antonio for guiding me to find the solution!

(I learned new things when investigating this, so not waste of time) :-)

Solution