nus-cs2103-AY1718S1 / forum

Discussion Forum
5 stars 0 forks source link

Travis CI java.util.concurrent.TimeoutException #188

Closed jhchia closed 6 years ago

jhchia commented 6 years ago

Recently I have been getting the java.util.concurrent.TimeoutException from Travis CI although I was able to pass all the tests (both headless and non-headless) on my computer.

Screenshot of the Travis job log: image

I had actually gotten this error a few days ago but I managed to circumvent it by removing chunks of tests (mostly the ones that involve selecting any person as I had changed the select function to display a profile instead of the google search) from the test files that had the java.util.concurrent.TimeoutException.

I thought all was well until the error had come back in full force. I had only added a few commits, since the last green tick from Travis, although they seem harmless. If anyone has any insights, they would be greatly appreciated!

UPDATE: Turns out that Travis doesn't play well with OAuth. Changed to using the generated API key instead and problem is solved for the time being.

Useful Links PR: https://github.com/CS2103AUG2017-T15-B1/main/pull/110 Travis CI: https://travis-ci.org/CS2103AUG2017-T15-B1/main

archthegit commented 6 years ago

Hi maybe it could be a problem with dependencies and their versions. I noticed you imported some google API in one of your commits, maybe you could check your list of dependencies and see if that didn't change from your previous version (before you made the changes).

jhchia commented 6 years ago

Hey, @archthegit thanks for your reply! I just checked the dependencies and they haven't changed from when I first imported them :(

damithc commented 6 years ago

Is the problem intermittent or fails every time? You can restart the build to retry. If master is passing but your PR is failing, most likely it is something you've done in your branch :-p

jhchia commented 6 years ago

Hi Prof @damithc , thanks for replying! I have tried restating the build and It keeps failing. But yeah, it's probably just this branch as I just pushed another branch to update my portfolio and Travis had no problems with that branch. I have a strong feeling it has something to do with the OAuth 2.0 for the YouTube Data API... I'm trying to switch to using the generated API key instead, although I'm still not sure if it'll work/ I'm competent enough to implement it xD

damithc commented 6 years ago

I have a strong feeling it has something to do with the OAuth 2.0 for the YouTube Data API... I'm trying to

I don't remember approving the use of YouTube API. Did you ask? 🤔

jhchia commented 6 years ago

Yeah, a few weeks back :) Link to request: https://github.com/nus-cs2103-AY1718S1/forum/issues/84

On another note, I seemed to have finally solved the issue by switching to using the API key instead of OAuth 2.0 😆😆😆😆 I have a feeling Travis was stuck at the part where user authorization was required, hence causing a timeout. Hopefully the issue doesn't come back...