Windows 10 reached EOS (end of support) on October 14, 2025. For more information, see this article.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

geolocation watchPosition timeout

  • 2 답장
  • 10 이 문제를 만남
  • 43 보기
  • 최종 답변자: brewster1134

more options

while implementing geolocation watchPosition functionality, i discovered an issue i experience with FF only.

after a success position is returned, the FF implementation of the geolocation spec should watch for position changes but instead fires a TIMEOUT. it seems as though the the timer is not being cancelled and reset after a successful position acquisition, and so it times out and may/or may not be cancelling system events to watch for further changes in position.

i included a simple example in the field below. the example returns SUCCESS upon finding the initial position, and then 10 seconds later (as specified by the timeout option) returns ERROR. no further attempts for a position are made.

in both chrome & safari, this returns SUCCESS multiple times.

while implementing geolocation watchPosition functionality, i discovered an issue i experience with FF only. after a success position is returned, the FF implementation of the geolocation spec should watch for position changes but instead fires a TIMEOUT. it seems as though the the timer is not being cancelled and reset after a successful position acquisition, and so it times out and may/or may not be cancelling system events to watch for further changes in position. i included a simple example in the field below. the example returns SUCCESS upon finding the initial position, and then 10 seconds later (as specified by the timeout option) returns ERROR. no further attempts for a position are made. in both chrome & safari, this returns SUCCESS multiple times.

선택된 해결법

Good work brewster! :)

I was going to say file a bug about this issue on bugzilla but there appears to be 5 different ones already filed. Check them out and see which one best fits your situation. Maybe you can add a comment to one of the bugs if you have some info that will help.


  • Bug 732923 - Geolocation in extension: watched position is updated not frequently enough, and with large timeout
  • Bug 732923 - Timeout is always being triggered on watchPosition (geolocation)
  • Bug 732928 - When calling navigator.geolocation.getCurrentPosition(), it will fail on timeout if a previous request has been made with a timeout option.
  • Bug 683472 - geolocation has trouble dealing with simultaneous calls to getCurrentPosition() and watchPosition()
  • Bug 492582 - Error [nsIDOMGeoGeolocation.watchPosition] when setting geo.enabled to false
문맥에 따라 이 답변을 읽어주세요 👍 0

모든 댓글 (2)

more options

선택된 해결법

Good work brewster! :)

I was going to say file a bug about this issue on bugzilla but there appears to be 5 different ones already filed. Check them out and see which one best fits your situation. Maybe you can add a comment to one of the bugs if you have some info that will help.


  • Bug 732923 - Geolocation in extension: watched position is updated not frequently enough, and with large timeout
  • Bug 732923 - Timeout is always being triggered on watchPosition (geolocation)
  • Bug 732928 - When calling navigator.geolocation.getCurrentPosition(), it will fail on timeout if a previous request has been made with a timeout option.
  • Bug 683472 - geolocation has trouble dealing with simultaneous calls to getCurrentPosition() and watchPosition()
  • Bug 492582 - Error [nsIDOMGeoGeolocation.watchPosition] when setting geo.enabled to false
more options

ha! i thought the bug filing process for FF seemed a bit 'Joe User'! I did a search on the forum for watchPosition that came up empty but now i know to use bugzilla! thanks... i have never filed a FF bug before. :)