Skip to content

[bug]: search client is permanently broken if initialized without network connectivity #1568

Open
@giantslogik

Description

@giantslogik

Description

If the search client is initialized when there is no network connectivity. It does not recover when connectivity is restored.

const searchClient = algoliasearch('algoliaAppId' , ‘algoliaApiKey’);

const sgAlgoliaIndex = searchClient.initIndex('indexname');

sgAlgoliaIndex.browseObjects…..

We re-execute the above code when connectivity is restored , however it continues to fail. We continue to get the same log output after connectivity is restored.

We get this error without a connection and then after internet connectivity is restored.

Client

Search

Version

^4.23.3

Relevant log output

{"name":"RetryError","message":"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.","transporterStackTrace":[{"request":{"data":"{\"query\":\"\",\"filters\":\"REMOVED",\"attributesToRetrieve\":[\"REMOVED\"]}","headers":{"x-algolia-api-key":"*****","x-algolia-application-id":"REMOVED","content-type":"application/x-www-form-urlencoded"},"method":"POST","url":"https://REMOVED-dsn.algolia.net/1/indexes/superGroups/browse?x-algolia-agent=Algolia%20for%20JavaScript%20(4.23.3)%3B%20Browser","connectTimeout":1,"responseTimeout":2},"response":{"content":"The Internet connection appears to be offline.","status":0,"isTimedOut":false},"host":{"protocol":"https","url":"REMOVED-dsn.algolia.net","accept":1},"triesLeft":3},{"request":{"data":"{\"query\":\"\",\"filters\":\"REMOVED",\"attributesToRetrieve\":[\"REMOVED\"]}","headers":{"x-algolia-api-key":"*****","x-algolia-application-id":"REMOVED","content-type":"application/x-www-form-urlencoded"},"method":"POST","url":"https://REMOVED-3.algolianet.com/1/indexes/superGroups/browse?x-algolia-agent=Algolia%20for%20JavaScript%20(4.23.3)%3B%20Browser","connectTimeout":1,"responseTimeout":2},"response":{"content":"The Internet connection appears to be offline.","status":0,"isTimedOut":false},"host":{"protocol":"https","url":"REMOVED-3.algolianet.com","accept":3},"triesLeft":2},{"request":{"data":"{\"query\":\"\",\"filters\":\"REMOVED\",\"attributesToRetrieve\":[\"REMOVED\"]}","headers":{"x-algolia-api-key":"*****","x-algolia-application-id":"REMOVED","content-type":"application/x-www-form-urlencoded"},"method":"POST","url":"https://REMOVED-1.algolianet.com/1/indexes/superGroups/browse?x-algolia-agent=Algolia%20for%20JavaScript%20(4.23.3)%3B%20Browser","connectTimeout":1,"responseTimeout":2},"response":{"content":"The Internet connection appears to be offline.","status":0,"isTimedOut":false},"host":{"protocol":"https","url":"REMOVED-1.algolianet.com","accept":3},"triesLeft":1},{"request":{"data":"{\"query\":\"\",\"filters\":\"type.type:Public AND NOT monetized:true AND summary.totalPosts>0\",\"attributesToRetrieve\":[\"publicId\"]}","headers":{"x-algolia-api-key":"*****","x-algolia-application-id":"REMOVED","content-type":"application/x-www-form-urlencoded"},"method":"POST","url":"https://REMOVED-2.algolianet.com/1/indexes/superGroups/browse?x-algolia-agent=Algolia%20for%20JavaScript%20(4.23.3)%3B%20Browser","connectTimeout":1,"responseTimeout":2},"response":{"content":"The Internet connection appears to be offline.","status":0,"isTimedOut":false},"host":{"protocol":"https","url":"REMOVED-2.algolianet.com","accept":3},"triesLeft":0}]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugexternalissue is caused by an other package but impacts the clientmore info needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions