• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Google map can not be used and can not add datasource

    Dashboard Designer & Custom AngularJS Pages
    3
    5
    1.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      JoHn-Beer
      last edited by JoHn-Beer

      I use MangoES. I can not open google map on mangoES. But I can test it on other MangoES. Can use google map.
      I do not know where to set it.

      Same Key API
      0_1529034422226_2018-06-15_10-42-29.jpg
      1_1529034422226_2018-06-15_10-43-39.jpg

      Other MangoES
      2_1529034422228_2018-06-15_10-45-32.jpg

      ma.log

      WARN 2018-06-15T19:55:52,271 (com.infiniteautomation.mango.rest.v2.ServerRestV2Controller.postClientError:222) - Client error [user=admin, cause=Possibly unhandled rejection: {"requireType":"scripterror","requireModules":["https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.7.2/angular-locale_th.js"],"originalError":{"isTrusted":true}}, location=http://192.168.0.199/ui/, userAgent=Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0, language=th, date=2018-06-15T19:55:49.737+07:00, timezone=Asia/Bangkok] Error: Script error for "https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.7.2/angular-locale_th.js" http://requirejs.org/docs/errors.html#scripterror at makeError (http://192.168.0.199/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=8e197a301817e1747ef0:39:108173) at onScriptError (http://192.168.0.199/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=8e197a301817e1747ef0:39:123472)
      WARN 2018-06-15T19:55:53,068 (com.infiniteautomation.mango.rest.v2.ServerRestV2Controller.postClientError:222) - Client error [user=admin, cause=Possibly unhandled rejection: {"requireType":"scripterror","requireModules":["https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.7.2/angular-locale_th.js"],"originalError":{"isTrusted":true}}, location=http://192.168.0.199/ui/administration/home, userAgent=Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0, language=th, date=2018-06-15T19:55:50.346+07:00, timezone=Asia/Bangkok] Error: Script error for "https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.7.2/angular-locale_th.js" http://requirejs.org/docs/errors.html#scripterror at makeError (http://192.168.0.199/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=8e197a301817e1747ef0:39:108173) at onScriptError (http://192.168.0.199/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=8e197a301817e1747ef0:39:123472)
      WARN 2018-06-15T19:56:29,119 (com.infiniteautomation.mango.rest.v2.ServerRestV2Controller.postClientError:222) - Client error [user=admin, cause=Possibly unhandled rejection: {"requireType":"scripterror","requireModules":["https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.7.2/angular-locale_en.js"],"originalError":{"isTrusted":true}}, location=http://192.168.0.199/ui/dashboard, userAgent=Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0, language=th, date=2018-06-15T19:56:26.387+07:00, timezone=Asia/Bangkok] Error: Script error for "https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.7.2/angular-locale_en.js" http://requirejs.org/docs/errors.html#scripterror at makeError (http://192.168.0.199/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=8e197a301817e1747ef0:39:108173) at onScriptError (http://192.168.0.199/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=8e197a301817e1747ef0:39:123472)
      WARN 2018-06-15T19:57:10,753 (com.serotonin.m2m2.web.mvc.spring.security.MangoAccessDeniedHandler.handle:54) - Denying access to Mango resource /rest/v2/server/client-error to IP 192.168.0.5 
      

      Can not add tag data source
      0_1529068290236_2018-06-15_20-10-44.jpg

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by

        Hi JoHn-Beer

        What versions of Mango are running on each ES? It could be related to: https://forum.infiniteautomation.com/topic/3577/query-an-external-web-service-from-a-mango-page

        For the one that is not rendering Google Maps, can you right click on the page, click 'inspect' and copy any errors from the console in the developer tools?

        Can not add tag data source

        You should check the ma.log for an error when it says status 500. Offhand I would guess you should delete your Mango/work/jsp directory on the machine that is giving you that 500 error.

        J 1 Reply Last reply Reply Quote 0
        • Jared WiltshireJ
          Jared Wiltshire
          last edited by

          @JoHn-Beer You can set web.security.contentSecurityPolicy to an empty string. e.g. web.security.contentSecurityPolicy= to disable the CSP completely. This might be acceptable if the machine is not exposed to the internet.

          Otherwise this will let you just allow access to google maps
          web.security.contentSecurityPolicy=default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://maps.google.com https://maps.googleapis.com; connect-src 'self' ws: wss:; img-src 'self' data: https://maps.google.com https://maps.gstatic.com

          Developer at Radix IoT

          1 Reply Last reply Reply Quote 0
          • J
            JoHn-Beer @phildunlap
            last edited by JoHn-Beer

            @phildunlap @Jared-Wiltshire

            Can not add tag data source
            You should check the ma.log for an error when it says status 500. Offhand I would guess you should delete your Mango/work/jsp directory on the machine that is giving you that 500 error.

            i check ma.log.

            
            WARN  2018-06-15T19:35:26,493 (com.serotonin.m2m2.web.mvc.spring.exception.ExceptionUtils.logWebException:56) - 
            REQUEST URL
            http://192.168.100.199/data_source_properties.shtm
            
            REQUEST PARAMETERS
               dsid=2
            
            
            REQUEST HEADERS
               Cookie=MANGO80=1ufyl8p6kezag2myi5xleqv6a; XSRF-TOKEN=ef0c6800-d270-43a3-9c2e-e356f0e16a3d
               X-Requested-With=XMLHttpRequest
               Accept=*/*
               Connection=keep-alive
               User-Agent=Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36
               Referer=http://192.168.100.199/data_sources.shtm
               Host=192.168.100.199
               Accept-Encoding=gzip, deflate
               Accept-Language=th-TH,th;q=0.9
               Content-Type=application/x-www-form-urlencoded
            
            
            REQUEST ATTRIBUTES
               org.springframework.web.context.request.async.WebAsyncManager.WEB_ASYNC_MANAGER=org.springframework.web.context.request.async.WebAsyncManager@1d0f7ea
               javax.servlet.error.status_code=500
               org.springframework.web.servlet.DispatcherServlet.CONTEXT=WebApplicationContext for namespace 'springDispatcher-servlet': startup date [Fri Jun 15 19:25:40 ICT 2018]; parent: Root WebApplicationContext
               javax.servlet.jsp.jstl.fmt.localizationContext.request=org.springframework.web.servlet.support.JstlUtils$SpringLocalizationContext@144ba27
               org.springframework.web.servlet.HandlerMapping.introspectTypeLevelMapping=false
               __spring_security_session_mgmt_filter_applied=true
               modulePath=/modules/internal
               org.springframework.web.servlet.DispatcherServlet.LOCALE_RESOLVER=org.springframework.web.servlet.i18n.SessionLocaleResolver@417648
               org.springframework.web.servlet.HandlerMapping.bestMatchingPattern=/data_source_properties.shtm
               org.springframework.web.servlet.DispatcherServlet.OUTPUT_FLASH_MAP=FlashMap [attributes={}, targetRequestPath=null, targetRequestParams={}]
               javax.servlet.error.exception_type=class org.apache.jasper.JasperException
               commPorts=[ - /dev/rs485-1]
               org.springframework.web.servlet.DispatcherServlet.FLASH_MAP_MANAGER=org.springframework.web.servlet.support.SessionFlashMapManager@2fdc6c
               lang=th
               lastUpgrade=1528942750
               availableLanguages=[]
               javax.servlet.http.HttpServletResponse=org.springframework.security.web.header.HeaderWriterFilter$HeaderWriterResponse@b405e4
               _csrf=org.springframework.security.web.csrf.DefaultCsrfToken@511d17
               __spring_security_filterSecurityInterceptor_filterApplied=true
               javax.servlet.error.servlet_name=springDispatcher
               javax.servlet.error.message=org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/dataSourceProperties.jsp at line 78
            
            
            1 Reply Last reply Reply Quote 0
            • phildunlapP
              phildunlap
              last edited by

              Did you try deleting your Mango/work/jsp directory?

              1 Reply Last reply Reply Quote 0
              • First post
                Last post