小编Ant*_*eme的帖子

发送电子邮件时调用未定义的方法 GuzzleHttp\Utils::chooseHandler()

我的应用程序工作正常,当我今天醒来时,我遇到了这个错误:

调用未定义的方法 GuzzleHttp\Utils::chooseHandler(

/opt/bitnami/apache/htdocs/php/plain/vendor/guzzlehttp/guzzle/src/HandlerStack.php:42

function choose_handler(): callable
    
    {
    
        return Utils::chooseHandler();
    
    }
Run Code Online (Sandbox Code Playgroud)

这是错误发生的时候:

Mail::to($request->email)->send(new ProfessionalInvited($clinic, $person, $inviteId));
Run Code Online (Sandbox Code Playgroud)

可能发生什么事?我该怎么办?我已经尝试删除我的供应商和composer.lock并重新安装所有内容。但没有成功。我在使用 guzzle 的 API 调用中也遇到了这个错误,当我更改为 cURL 时,一切正常。但我不认为我可以做同样的事情来发送电子邮件,因为 Guzzle 是一个依赖项。

php laravel guzzle

5
推荐指数
1
解决办法
9012
查看次数

世博会推送通知不适用于独立应用程序

我使用 expo 推送系统设置了推送通知,通过 ExpoGo 使用该应用程序时效果很好。但在从 Play 商店安装的应用程序中,它不起作用。调试应用程序我发现

token = (await Notifications.getExpoPushTokenAsync()).data;
Run Code Online (Sandbox Code Playgroud)

没有返回任何内容,因为它之后的警报从未运行。

async function registerForPushNotificationsAsync() {
    let token;
    const { status: existingStatus } = await Permissions.getAsync(Permissions.NOTIFICATIONS);
    let finalStatus = existingStatus;
    if (existingStatus !== 'granted') {
      const { status } = await Permissions.askAsync(Permissions.NOTIFICATIONS);
      finalStatus = status;
    }
    if (finalStatus !== 'granted') {
      alert('Failed to get push token for push notification!');
      return;
    }
    alert('1')
    token = (await Notifications.getExpoPushTokenAsync()).data;
    alert('2')
    if (Platform.OS === 'android') {
      Notifications.setNotificationChannelAsync('default', {
        name: 'default',
        importance: Notifications.AndroidImportance.MAX,
        vibrationPattern: [0, …
Run Code Online (Sandbox Code Playgroud)

android push reactjs react-native expo

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

android ×1

expo ×1

guzzle ×1

laravel ×1

php ×1

push ×1

react-native ×1

reactjs ×1