JibayMcs / filament-tour

Let's embed the power of DriverJS to your filament admin panel, and guide peoples through your app
MIT License
99 stars 28 forks source link

[Bug]: Uncaught TypeError: Cannot convert undefined or null to object #7

Open darren-glanville opened 1 year ago

darren-glanville commented 1 year ago

What happened?

I am not able to get the plugin working as the get the error in concole from the js file.

How to reproduce the bug

<?php

namespace App\Filament\Pages;

use Filament\Pages\Dashboard as BasePage;
use JibayMcs\FilamentTour\Tour\HasTour;
use JibayMcs\FilamentTour\Tour\Step;
use JibayMcs\FilamentTour\Tour\Tour;

class Dashboard extends BasePage
{
    use HasTour;

    /**
     * Columns
     */
    public function getColumns(): int | string | array
    {
        return [
            'base' => 1,
            'md' => 2,
            'xl' => 6,
        ];
    }

    public function tours(): array
    {
        return [
            Tour::make('dashboard')
                ->steps(
                    Step::make()
                        ->title("Welcome to your Dashboard !")
                        ->description("hello"),
                    Step::make('.fi-avatar')
                        ->title('Woaw ! Here is your avatar !')
                        ->description('You look nice !')
                        ->icon('heroicon-o-user-circle')
                        ->iconColor('primary')
                ),
        ];
    }
}

Package Version

3.0.0

PHP Version

8.2.12

Laravel Version

10.0.0

Which operating systems does with happen with?

Linux

Notes

filament-tour-scripts.js?v=3.1.0.3:2 Uncaught TypeError: Cannot convert undefined or null to object
    at getOwnPropertyNames (<anonymous>)
    at V (filament-tour-scripts.js?v=3.1.0.3:2:627)
    at r (filament-tour-scripts.js?v=3.1.0.3:2:14278)
    at Object.drive (filament-tour-scripts.js?v=3.1.0.3:2:15107)
    at d (filament-tour-scripts.js?v=3.1.0.3:2:23890)
    at n (filament-tour-scripts.js?v=3.1.0.3:2:19585)
    at filament-tour-scripts.js?v=3.1.0.3:2:19052
    at livewire.js?id=11c49d7e:4366:7
    at dispatchEvent (livewire.js?id=11c49d7e:4340:12)
    at dispatch3 (livewire.js?id=11c49d7e:4343:5)
V @ filament-tour-scripts.js?v=3.1.0.3:2
r @ filament-tour-scripts.js?v=3.1.0.3:2
drive @ filament-tour-scripts.js?v=3.1.0.3:2
d @ filament-tour-scripts.js?v=3.1.0.3:2
n @ filament-tour-scripts.js?v=3.1.0.3:2
(anonymous) @ filament-tour-scripts.js?v=3.1.0.3:2
(anonymous) @ livewire.js?id=11c49d7e:4366
dispatchEvent @ livewire.js?id=11c49d7e:4340
dispatch3 @ livewire.js?id=11c49d7e:4343
(anonymous) @ livewire.js?id=11c49d7e:4334
dispatchEvents @ livewire.js?id=11c49d7e:4328
(anonymous) @ livewire.js?id=11c49d7e:4307
trigger @ livewire.js?id=11c49d7e:474
processEffects @ livewire.js?id=11c49d7e:735
handleResponse @ livewire.js?id=11c49d7e:714
(anonymous) @ livewire.js?id=11c49d7e:590
succeed @ livewire.js?id=11c49d7e:590
(anonymous) @ livewire.js?id=11c49d7e:571
await in (anonymous) (async)
queueNewRequestAttemptsWhile @ livewire.js?id=11c49d7e:614
sendRequestToServer @ livewire.js?id=11c49d7e:508
(anonymous) @ livewire.js?id=11c49d7e:494
(anonymous) @ livewire.js?id=11c49d7e:502
setTimeout (async)
bundleMultipleRequestsTogetherIfTheyHappenWithinFiveMsOfEachOther @ livewire.js?id=11c49d7e:501
triggerSend @ livewire.js?id=11c49d7e:493
(anonymous) @ livewire.js?id=11c49d7e:651
(anonymous) @ livewire.js?id=11c49d7e:608
waitUntilTheCurrentRequestIsFinished @ livewire.js?id=11c49d7e:604
requestCall @ livewire.js?id=11c49d7e:649
(anonymous) @ livewire.js?id=11c49d7e:4177
(anonymous) @ livewire.js?id=11c49d7e:4116
handler4 @ livewire.js?id=11c49d7e:4314
dispatchEvent @ livewire.js?id=11c49d7e:4340
dispatchGlobal @ livewire.js?id=11c49d7e:4346
(anonymous) @ filament-tour-scripts.js?v=3.1.0.3:2
dispatch @ livewire.js?id=11c49d7e:316
start2 @ livewire.js?id=11c49d7e:6665
(anonymous) @ livewire.js?id=11c49d7e:7586
ingmontoya commented 12 months ago

did you add the plugin to your AdminPanelProvider?

darren-glanville commented 12 months ago

Yes, added to the provider

darren-glanville commented 12 months ago

I am able to add it to a page, but the issue here is on the Dashboard page

darren-glanville commented 11 months ago

Hi, I need an answer please to this

DevRaeph commented 10 months ago

Same problem here on Mac OS, PHP 8.2 and 8.3, can anyone explain?

gexcube commented 8 months ago

same problem here

JibayMcs commented 3 months ago

Hi !

I'm unable to reproduce the bug, maybe the last release fixed it ? v3.1.0.6

Steve1258 commented 1 month ago

i have also the same problem for version 3.1.0.9

moedayraki commented 2 weeks ago

I'm not getting any error but the Done and the 'X' buttons are not working and they're not closing the tour so there's no way to get out of the tour now.

Same thing for the highlights.

image