quantmod error in getSymbols(): download failed

Hi everyone!I am new to R community and today I have a question with 'quantmod' package. I run the following code, but shows a warning message.

getSymbols("AAPL",from = "2008-01-01",to = "2019-12-31")

It seems R can not connect to Yahoo. But, I can actually log to the website https://finance.yahoo.com/. Can anyone tell me what the problem is?

what version of quantmod are you using ?

packageVersion("quantmod")

quantmod is at the mercy of yahoo changing their api etc, their most recent 'fix' for changes came with most recent cran version 0.4.20 apparently

Hi Nirgrahamuk,

I checked the version of quantmod and it shows ‘0.4.20’. It seems this is the newest version?