Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Report only] A lot of errors after logging in #81

Open
ppascualv opened this issue Dec 27, 2022 · 1 comment
Open

[Report only] A lot of errors after logging in #81

ppascualv opened this issue Dec 27, 2022 · 1 comment

Comments

@ppascualv
Copy link

I just added the library to my React app and after logging in, I'm receiving a lot of errors related to permissions and security.
Screenshot 2022-12-27 at 12 56 13

The code related to Aircall

import { Fab, Paper, SvgIcon } from "@mui/material"
import LoginIcon from "@mui/icons-material/Login"
import { useTranslation } from "next-i18next"
import { styled } from "@mui/system"
import AircallPhone from "aircall-everywhere"
import useIntegrations from "../../hooks/useIntegrations"
import { useState } from "react"
import AircallPic from "../../../public/images/third_party_logos/aircall.svg"
import AircallSVG from "../customSVG/AircallSVG"
import AircallIcon from "../customSVG/AircallSVG"

const StyledFab = styled(Fab)(({ theme }) => ({
  position: "fixed",
  top: "80px",
  right: "20px",
  backgroundColor: "white"
}))

const AircallContainer = styled(Paper)(({ theme }) => ({
  position: "fixed",
  top: "130px",
  right: "50px",
  zIndex: 2000,
  "& #phone": {
    iframe: {
      border: 0
    }
  }
}))

export default function AircallIntegration() {
  const { t } = useTranslation()
  const { included: aircall } = useIntegrations("aircall")
  const { included: hubspot } = useIntegrations("hubspot")
  const [login, setLogin] = useState(false)
  const phone = new AircallPhone({
    domToLoadPhone: "#phone",
    onLogin: settings => {
      console.log(settings)
      setLogin(true)
    },
    onLogout: () => {
      setLogin(false)
    },
    //integrationToLoad: hubspot ? "hubspot" : null,
    size: "big",
    debug: process.env.REACT_APP_ENVIRONMENT === "development"
  })

  //if (true) return null

  if (!aircall) return null

  return (
    <>
      <StyledFab size="large">
        <AircallIcon size="large" />
      </StyledFab>
      <AircallContainer elevation={3}>
        <div id="phone" />
      </AircallContainer>
    </>
  )
}

@ppascualv ppascualv changed the title [Report only] Errors preventing many files from connect [Report only] A lot of errors after logging in Dec 27, 2022
@itag-tech
Copy link

Same observation on my React application and these errors are also present on the demo version that is available online here (on "load phone" button) : https://aircall.github.io/aircall-everywhere/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants